Message44091
Logged In: YES
user_id=31392
My checkin 2.240 had the side-effect of restoring the
behavior we got in 2.2.x. My checkin comment wasn't very
clear about this (nor was the 2.215 comment that added this
feature).
Somehow the check for whether slots were allowed added a
condition that could never be true. So there was no way to
get the TypeError "nonempty __slots__ not supported for
subtype of '%s'".
I don't think the change was intentional. In addition to
the string crash, it created the possiblity for mutable tuples:
>>> class T(tuple):
... __slots__ = "x", "y"
...
>>> t = T((1, 2))
>>> t
(1, 2)
>>> t.x
1
>>> t.y
2
>>> t.y = -1
>>> t
(1, -1)
|
|
Date |
User |
Action |
Args |
2007-08-23 15:27:54 | admin | link | issue757997 messages |
2007-08-23 15:27:54 | admin | create | |
|