On Fri, Jun 22, 2018 at 7:23 PM, Steven D'Aprano firstname.lastname@example.org wrote:
But once it becomes a more common idiom, students will see it in the wild pretty early in their path to learning python. So we'll need to start introducing it earlier than later.
Students see many features early in their path. I've had people still struggling with writing functions ask about metaclasses. People will see async code everywhere. We don't have to teach *everything* at once.
These are not similar at all -- if you want similar examples, I"d say comprehensions, and lambda, both of which I DO introduce fairly early
While newbies will *ask* about metaclasses, it's probably because they read about them somewhere, not because someone actually used a metaclass in a simple script or answer to a common question on SO.
As for async, you are either doing async or not -- you can't even run an async def function without an event loop -- so again, it won't show up in real code newbies need to understand (at least until async becomes common practice with python...)
So if you absolutely need to teach it to a beginner, it
shouldn't be difficult once they understand the difference between an expression and a statement.
probably not, though that's a distinction that's mostly academic in the early stages of learning, it may become more critical now...
again, not a huge deal, just a little bit more complexity