Classmethods are evil
Ivan Illarionov
ivan.illarionov at gmail.com
Sat May 17 00:01:50 EDT 2008
After re-reading "Python is not Java" I finally came to conclusion that
classmethods in Python are a very Bad Thing.
I can't see any use-case of them that couldn't be re-written more clearly
with methods of metaclass or plain functions.
They have the following issues:
1. You mix instance-level and class-level functionality in one place
making your code a mess.
2. They are slower than metaclass methods or plain functions.
I really want to hear your opinions on the subject.
-- Ivan
More information about the Python-list
mailing list