Alex <alex.gay...@gmail.com> added the comment: How can they be set afterwords?
alex@alex-laptop:~/projects/pypy$ python3.1 Python 3.1.2 (release31-maint, Sep 17 2010, 20:34:23) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class A(object): ... pass ... >>> A.__dict__[32] = "heh" Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'dict_proxy' object does not support item assignment >>> setattr(A, 32, "heh") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: attribute name must be string, not 'int' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11455> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com