lift the required call to super() in grok.Container subclasses that override __init__
Bug #162286 reported by
Martijn Faassen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grok |
Won't Fix
|
Wishlist
|
trollfot | ||
1.1 |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
When you subclass from grok.Container, it's very natural to do something like this:
class MyContainer(
def __init__(self):
self.foo = 'bar'
This will fail with some obscure error concerning SampleData (of all things. Martijn's rule: in code, never call anything 'Sample', or 'Simple', or you'll regret it).
To solve this, you need to call super in your own __init__:
class MyContainer(
def __init__(self):
self.foo = 'bar'
We need a grok.Container which doesn't have this commonly surprising requirement.
Changed in grok: | |
assignee: | nobody → faassen |
milestone: | none → 1.0 |
Changed in grok: | |
importance: | Undecided → Wishlist |
Changed in grok: | |
assignee: | Martijn Faassen (faassen) → trollfot (trollfot) |
Changed in grok: | |
status: | Confirmed → Won't Fix |
To post a comment you must log in.
While this would be desirable, this would be non-trivial to fix and the work is therefore deferred to post 1.0.