diff options
author | Guido van Rossum <guido@python.org> | 1998-05-29 21:37:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-05-29 21:37:21 (GMT) |
commit | a63eff6e6aac8325cb3542a2d678cfc69fa8597e (patch) | |
tree | b41dcde4dae24912d027cb506f70a4a955bb1ec4 /Python | |
parent | fe216b79373c9cb70b1c880abd5b21e87668f157 (diff) | |
download | cpython-a63eff6e6aac8325cb3542a2d678cfc69fa8597e.zip cpython-a63eff6e6aac8325cb3542a2d678cfc69fa8597e.tar.gz cpython-a63eff6e6aac8325cb3542a2d678cfc69fa8597e.tar.bz2 |
Allow assignments to special class attributes -- with typechecks, and
not in restricted mode.
__dict__ can be set to any dictionary; the cl_getattr, cl_setattr and
cl_delattr slots are refreshed.
__name__ can be set to any string.
__bases__ can be set to to a tuple of classes, provided they are not
subclasses of the class whose attribute is being assigned.
__getattr__, __setattr__ and __delattr__ can be set to anything, or
deleted; the appropriate slot (cl_getattr, cl_setattr, cl_delattr) is
refreshed.
(Note: __name__ really doesn't need to be a special attribute, but
that would be more work.)
Diffstat (limited to 'Python')
0 files changed, 0 insertions, 0 deletions