Message130522
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:48 | alex | set | recipients:
+ alex, loewis, pitrou, stutzbach, michael.foord, daniel.urban |
2011-03-10 18:53:48 | alex | set | messageid: <1299783228.52.0.918181328211.issue11455@psf.upfronthosting.co.za> |
2011-03-10 18:53:45 | alex | link | issue11455 messages |
2011-03-10 18:53:45 | alex | create | |
|