New submission from Carlos Scheidegger [EMAIL PROTECTED]:
When creating ctypes.Structure classes dynamically, there's a gotcha.
_fields_ is final, but it takes a list that can be appended to. I'm not
sure this is a bug, but I would argue it is a lot more surprising than
it could be:
Python
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
The __slots__ member of a class object has the same behavior.
You may mutate it (even replace it) but this has no effect: only the
value available when the class statement was executed is relevant.
--
nosy: +amaury.forgeotdarc
Thomas Heller [EMAIL PROTECTED] added the comment:
The __slots__ member of a class object has the same behavior.
You may mutate it (even replace it) but this has no effect: only the
value available when the class statement was executed is relevant.
The rules in ctypes are a little bit more
Thomas Heller [EMAIL PROTECTED] added the comment:
Closing as won't fix.
--
resolution: - wont fix
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2680
__