half object/half dictionary
Manuel M. Garcia
mgarcia at cole-switches.com
Mon Dec 9 18:53:07 EST 2002
More information about the Python-list mailing list
Mon Dec 9 18:53:07 EST 2002
- Previous message (by thread): Python + Mozilla/XUL/...
- Next message (by thread): half object/half dictionary
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks so much! It is becoming clearer (still hazy, but better) My mind still boggles at why we would need 'cls' in the following statements: class meta1(type): def __new__(cls, classname, bases, classdict): return type.__new__(cls, classname, bases, classdict) Here is an example of a metaclass where 'cls' is used and not just passed along to type.__new__ : http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 but I can't say I really understand this. Does type.__new__(cls, classname, bases, classdict) do anything with 'cls'? Manuel
- Previous message (by thread): Python + Mozilla/XUL/...
- Next message (by thread): half object/half dictionary
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list