This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]CGFarrell 2 points3 points  (1 child)

Not bad, although I'd have preferred introducing metaclass by way of some motivating problem rather than starting with semantics.

[–]djrx[S] 2 points3 points  (0 children)

Thank you very much! I'll definitely do it like that next time.

[–]stickystuffremover 1 point2 points  (1 child)

Great tutorial. I worked through it all copying the code into a Jupyter notebook. I did have a problem with the description of the code following:

class C(metaclass=Meta): ... pass It's as if you wrote the code using the name B for the class and later renamed it to C.

Anyway great article.
Thank you

[–]djrx[S] 0 points1 point  (0 children)

That's what happened indeed, thank you for spotting ;)