[Python-Dev] can't set attributes of built-in/extension type
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Feb 24 08:35:51 CET 2008
More information about the Python-Dev mailing list
Sun Feb 24 08:35:51 CET 2008
- Previous message: [Python-Dev] can't set attributes of built-in/extension type
- Next message: [Python-Dev] getpass and stdin
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Neal Becker wrote: > (Or, help me understand, what is the difference between a type that I create > using python C api and a python class?) Classes that you create in Python have a __dict__ attribute holding a dictionary for arbitrary attributes to go in. Most types defined in C don't bother providing a __dict__, since one doesn't normally need to add arbitrary attributes to them, and the overhead would be almost completely wasted. -- Greg
- Previous message: [Python-Dev] can't set attributes of built-in/extension type
- Next message: [Python-Dev] getpass and stdin
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list