__init__ method for containers
Neil Cerutti
horpner at yahoo.com
Wed Dec 12 11:05:20 EST 2007
On 2007-12-12, Calvin Spealman <ironfroggy at socialserve.com> wrote:
> I agree that the behavior should be more consistant, but you
> also should not be calling __init__ more than once on any
> given instance and that in and of itself should probably
> constitute undefined behavior.
That seems wise to me, too, but the the explicit __init__ test in
test_deque seems to argue otherwise. Maybe the test in error.
Moreover, the behavior of deque.__init__ may actually contradict
its doc string.
>>> help(deque.__init__)
Help on wrapper_descriptor:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
--
Neil Cerutti
A song fest was hell at the Methodist church Wednesday. --Church Bulletin
Blooper
More information about the Python-list
mailing list