Message31571
object.__init__ currently allows any amount of args and keywords even though they're ignored. This is inconsistent with other built-ins, like list, that are stricter about what they'll accept. It's also inconsistent with object.__new__, which does throw if any are provided (if the default __init__ is to be used).
To reproduce:
object.__init__(object(), foo, bar=3)
This is a slight irritation when using cooperative super calling. I'd like each class' __init__ to cherry-pick keyword params it accepts and pass the remaining ones up the chain, but right now I can't rely on object.__init__ to throw if there are remaining keywords by that point. |
|
Date |
User |
Action |
Args |
2007-08-23 14:52:35 | admin | link | issue1683368 messages |
2007-08-23 14:52:35 | admin | create | |
|