On Sun, 5 Dec 2004 19:52:57 +0100, Laszlo Zsolt Nagy <[EMAIL PROTECTED]> wrote: >Hello all, > > Can anyone explain this: > > > C:\Python\Projects\DbDesigner>python > Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> from Db.FieldTypes import IdentifierFieldType > >>> from Db.FieldTypes import * > Traceback (most recent call last): > File "<stdin>", line 1, in ? > TypeError: attribute name must be string > >>> > > I can do anything except "import *" - in that case, I get this very > strange exception. Do you have any idea? >
[EMAIL PROTECTED]:~$ cat foo.py x = 10 __all__ = [x] [EMAIL PROTECTED]:~$ cat bar.py x = 20 __all__ = ['x'] [EMAIL PROTECTED]:~$ python -c "from foo import *; print x" Traceback (most recent call last): File "<string>", line 1, in ? TypeError: attribute name must be string [EMAIL PROTECTED]:~$ python -c "from bar import *; print x" 20 [EMAIL PROTECTED]:~$ Hope this helps, Jp -- http://mail.python.org/mailman/listinfo/python-list