Static class attributes
Duncan Booth
duncan at NOSPAMrcp.co.uk
Mon Dec 9 04:33:53 EST 2002
Terry Hancock <hancock at anansispaceworks.com> wrote in
news:mailman.1039412831.9448.python-list at python.org:
> All "class"es have the same "type": "class". If we were using Python
> terminology, so I guess you must not be.
Monday morning pedantry, not all classes have the same type:
>>> class C: pass
>>> class D(object): pass
>>> type(C)
<type 'class'>
>>> type(D)
<type 'type'>
>>> class meta(object): pass
>>> class E:
__metaclass__ = meta
>>> type(E)
<class '__main__.meta'>
>>>
--
Duncan Booth duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
More information about the Python-list
mailing list