This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alex
Recipients alex, daniel.urban, loewis, michael.foord, pitrou, stutzbach
Date 2011-03-10.18:53:44
SpamBayes Score 4.2834364e-07
Marked as misclassified No
Message-id <>
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'
Date User Action Args
2011-03-10 18:53:48alexsetrecipients: + alex, loewis, pitrou, stutzbach, michael.foord, daniel.urban
2011-03-10 18:53:48alexsetmessageid: <>
2011-03-10 18:53:45alexlinkissue11455 messages
2011-03-10 18:53:45alexcreate