[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Daniel. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___ Pyt

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-03-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset d50a71994f51 by Raymond Hettinger in branch 'default': Issue #11333: Add __slots__ to the collections ABCs. http://hg.python.org/cpython/rev/d50a71994f51 -- nosy: +python-dev ___ Python tracker

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file20940/annotations_workaround.py ___ Python tracker ___ ___ Python-bugs

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg129664 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Until and unless this gets fixed, perhaps we should document some sort of workaround. One possibility is attached. -- Added file: http://bugs.python.org/file20940/annotations_workaround.py ___ Python tracker

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like everyone is in favor of the change. I'll apply the patch after adding some comments and tests. -- assignee: ncoghlan -> rhettinger ___ Python tracker __

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: I think the idea is reasonable. (I haven't checked the patch.) -- assignee: gvanrossum -> ncoghlan ___ Python tracker ___ ___

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: I like the idea, and it seems to work as expected (i.e. an empty __slots__ doesn't conflict with inheritance from a C defined type or a type with non-empty __slots__). However, __slots__ is one of the sections of the type machinery I'm least familiar with, so

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido? -- assignee: -> gvanrossum nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-26 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-26 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: +1. I've bumped into exactly this problem (https://github.com/DanielStutzbach/blist/issues/closed#issue/29) I'm not intimately familiar with how __slots__ works. Are there any drawbacks to adding an empty __slots__ to the ABCs? -- __

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-26 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-26 Thread Daniel Urban
New submission from Daniel Urban : Currently instances of classes which inherit an ABC in collections.abc will have a __dict__. This can be a problem for example a tree-like data structure. It would make sense to inherit for example MutableMapping, but that would possibly mean, that every nod