[issue7659] Attribute assignment on object() instances raises wrong exception

2017-04-04 Thread R. David Murray
R. David Murray added the comment: Agreed. Time to close this. -- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ _

[issue7659] Attribute assignment on object() instances raises wrong exception

2017-04-04 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: I don't think a change is actually needed here (bumping to decide the fate of this issue) -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker __

[issue7659] Attribute assignment on object() instances raises wrong exception

2016-11-17 Thread Pascal Chambon
Pascal Chambon added the comment: I guess it can, since retrocompatibility prevents some normalization here. Or is it worth updating the doc about "AttributeError", misleading regarding the type of exception expected in this case ? -- status: pending -> open __

[issue7659] Attribute assignment on object() instances raises wrong exception

2016-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could this issue be closed now? -- nosy: +serhiy.storchaka status: open -> pending ___ Python tracker ___ _

[issue7659] Attribute assignment on object() instances raises wrong exception

2011-01-26 Thread Nick Coghlan
Nick Coghlan added the comment: Along the lines of RDM's last post, see: http://code.activestate.com/recipes/52308-the-simple-but-handy-collector-of-a-bunch-of-named/ Or, if you do a few web searches for terms like "bethard coghlan namespaces" or "bethard generic objects" you'll get results al

[issue7659] Attribute assignment on object() instances raises wrong exception

2011-01-26 Thread Nick Coghlan
Nick Coghlan added the comment: Object instances don't get a __dict__ by default to save the space the pointer and dict instance would require. Most builtins are missing that pointer. It is also the main memory saving provided by the use of __slots__. As far as AttributeError vs TypeError goe

[issue7659] Attribute assignment on object() instances raises wrong exception

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue7659] Attribute assignment on object() instances raises wrong exception

2010-01-08 Thread R. David Murray
R. David Murray added the comment: But an object to which you can assign attributes but which has no methods can be useful in a number of contexts. It's not a glorified dict, because attribute-style access is different from dict-style access. The main place I have used this (creating my own

[issue7659] Attribute assignment on object() instances raises wrong exception

2010-01-08 Thread Pascal Chambon
Pascal Chambon added the comment: OK, eligible to QOTW:D -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7659] Attribute assignment on object() instances raises wrong exception

2010-01-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think it's an optimization. The point is that object is mostly meant to be subclassed, not to be used as a glorified dict. -- nosy: +pitrou ___ Python tracker

[issue7659] Attribute assignment on object() instances raises wrong exception

2010-01-08 Thread Pascal Chambon
Pascal Chambon added the comment: Allright, I suppose it's some kind of optimization ? We get a proper error when we do : >>> object.test=1 Traceback (most recent call last): File "", line 1, in object.test=1 TypeError: can't set attributes of built-in/extension type 'object' >>> So

[issue7659] Attribute assignment on object() instances raises wrong exception

2010-01-08 Thread Brian Curtin
Brian Curtin added the comment: The 3.x documentation[1] has this: "object does not have a __dict__, so you can’t assign arbitrary attributes to an instance of the object class." - 2.x doesn't have that same blurb -- it looks like it should. AttributeError vs. TypeError seems to be the issue h