exarkun@boson:~$ cat foo.py
x = 10
__all__ = [x]
exarkun@boson:~$ cat bar.py
x = 20
__all__ = ['x']
exarkun@boson:~$ python -c "from foo import *; print x"
Traceback (most recent call last):
File "<string>", line 1, in ?
TypeError: attribute name must be string
exarkun@boson:~$ python -c "from bar import *; print x"
20
exarkun@boson:~$ Hope this helps,
Definitely. However, it would be better if the exception occurred on the
bad assignment (e.g. __all__ = [x]) but probably it would be
extremely hard to implement. Moreover, you can add items to __all__ in
runtime. Well okay, this is not something humans do. :-)
Another note: the same code was working with 2.3.x, the problem I'm
having is only 2.3.4. - I should have checked the change log.
Thank again
--
Laszlo
mailto:ga*****@geochemsource.com
web:http://designasign.biz