[Python-Dev] cls for metaclass? (original) (raw)
Pim Schellart p.schellart at princeton.edu
Mon Jan 29 14:34:42 EST 2018
- Previous message (by thread): [Python-Dev] Making "-j0" the default setting for the test suite?
- Next message (by thread): [Python-Dev] cls for metaclass?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dear Python developers,
PEP 8 says:
"Always use self for the first argument to instance methods.
Always use cls for the first argument to class methods.”
But what about metaclasses?
PEP 3115 seems to suggest cls
, and so do many Python books, however tools such as flake8 don’t seem to like it.
Is there a consensus opinion, and should PEP 8 be updated?
Kind regards,
Pim Schellart
- Previous message (by thread): [Python-Dev] Making "-j0" the default setting for the test suite?
- Next message (by thread): [Python-Dev] cls for metaclass?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]