[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: tuples are already allowed for __all__, which breaks attempts to monkey-patch it. I did forget to check the return from PyObject_GetIter. __ Tracker <[EMAIL PROTECTED]> _

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- resolution: -> rejected status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Pytho

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: I agree. There seems to be no compelling use case. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: The breakage isn't from the patch. The problem would come from using a non-list iterable for __all__ which then breaks any other code that assumes __all__ is a list (the code is os is an example of how __all__ can get modified). AFAI

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: You don't check for NULL return from PyObject_GetIter(). It will segfault for "__all__ = 1". That demonstrates that test cases are missing from the patch. :) Raymond: It shouldn't since __all__ is only inspected after the module code has been

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Does this break code that adds to __all__ using append() and extend()? See the os module for an example. -- assignee: -> rhettinger nosy: +rhettinger type: -> feature request versions: +Python 2.6 _

[issue2928] Allow set/frozenset for __all__

2008-05-19 Thread Adam Olsen
New submission from Adam Olsen <[EMAIL PROTECTED]>: Patch allows any iterable (such as set and frozenset) to be used for __all__. I also add some blank lines, making it more readable. -- files: python-importall.diff keywords: patch messages: 67104 nosy: Rhamphoryncus severity: normal st