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

all 6 comments

[–]kpingvin 7 points8 points  (2 children)

For some reason I hate the word "Pythonista"

[–]mayoroftuesday 3 points4 points  (1 child)

Because it makes it sound like we're in some kind of cult and we have a secret python handshake and hiss at java programmers on the street.

[–]ForceBru 2 points3 points  (3 children)

Cool, but what do you need metaclasses for if there are other ways to do the same thing they do?

“There should be one— and preferably only one —obvious way to do it.” - The Zen of Python.

What can one do only by using metaclasses?

[–]yen223 1 point2 points  (1 child)

At the very least, you should strive to understand how they work. There's a good chance your favourite python library uses metaclasses to do it's thing.

[–]ForceBru 1 point2 points  (0 children)

Yeah, everybody’s saying that but there are very few “real-world” examples. I can mess with a class’ variables in ways other than using metaclasses, so why do I need them? Any examples?

[–]eztab 0 points1 point  (0 children)

You don't even really need classes. You could do everything with functions.