zope.proxy: class attributes shadow __slots__
Bug #186631 reported by
Christian Theune
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BlueBream |
New
|
Undecided
|
Unassigned | ||
Zope 3 |
Won't Fix
|
Undecided
|
Unassigned | ||
zope.proxy |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Define a subclass from SpecificationDe
class MyProxy(
__slots__ = ('foo',)
foo = None
Now, when using an instance of `MyProxy` the following will happen:
>>> f = MyProxy([])
>>> print f.foo
None
>>> f.foo = 'bar'
>>> print f.foo
None
When not assigning `foo` as a class attribute, it works. IMHO this isn't exactly intended to work this way, but the tests don't specify anything here.
Changed in zope3: | |
status: | New → Won't Fix |
To post a comment you must log in.
Now tracked on Github:
https:/ /github. com/zopefoundat ion/zope. proxy/issues/ 1