Re: Python 3.1, object, and setattr()

2010-04-01 Thread Ethan Furman
Many thanks for the replies, and especially for the very detailed explanation. Makes much more sense now. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.1, object, and setattr()

2010-04-01 Thread Terry Reedy
On 4/1/2010 10:16 AM, Steve Howell wrote: On Apr 1, 6:46 am, Ethan Furman wrote: On 2.6.2 the error seems to be limited to instances of object. If you subclass object, you are fine. I do not know why that is so; As the other Steve said, object is a built-in class; user-defined subclasses o

Re: Python 3.1, object, and setattr()

2010-04-01 Thread Steve Holden
Ethan Furman wrote: > Greetings! > > Perhaps I woke up too early this morning, but this behaviour has me > baffled: > > Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > > --> test =

Re: Python 3.1, object, and setattr()

2010-04-01 Thread Steve Holden
Ethan Furman wrote: > Greetings! > > Perhaps I woke up too early this morning, but this behaviour has me > baffled: > > Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > > --> test =

Re: Python 3.1, object, and setattr()

2010-04-01 Thread Steve Howell
On Apr 1, 6:46 am, Ethan Furman wrote: > Greetings! > > Perhaps I woke up too early this morning, but this behaviour has me baffled: > > Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information.

Python 3.1, object, and setattr()

2010-04-01 Thread Ethan Furman
Greetings! Perhaps I woke up too early this morning, but this behaviour has me baffled: Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. --> test = object() --> setattr(test, 'example'