possible bug in inheritence from tuple

Joachim Boomberschloss boomberschloss at yahoo.com
Thu Sep 9 10:51:03 EDT 2004


The following code should in my opinion have ended with (1,2,3,4). It works fine when inheriting from list. Is this a bug in python?
 
>>> class Test(tuple):
...  def __init__(self):
...   tuple.__init__(self, (1,2,3,4))
...   
>>> t = Test()
>>> t
()
 


		
---------------------------------
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040909/e8170235/attachment.html>


More information about the Python-list mailing list