Hi all,
Is there any reason that under Python you cannot instantiate the object
class and create any attributes like you would be able for a normal class?
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
win32
Type help, copyright, credits or license for more
Pierre Rouleau [EMAIL PROTECTED] wrote:
Hi all,
Is there any reason that under Python you cannot instantiate the object
class and create any attributes like you would be able for a normal class?
Yep: instances of type object do not have a __dict__ and therefore there
is no place to put any
Alex Martelli wrote:
Pierre Rouleau [EMAIL PROTECTED] wrote:
Hi all,
Is there any reason that under Python you cannot instantiate the object
class and create any attributes like you would be able for a normal class?
Yep: instances of type object do not have a __dict__ and therefore
Pierre Rouleau [EMAIL PROTECTED] wrote:
...
I can understand the design decision not to give object a __dict__, but
I wonder if i'd be a good idea to have a class that derives from object
and has a __dict__ to be in the standard library. I posted the original
question because I run into