Question about extending tuple

abcd codecraig at gmail.com
Wed Mar 28 22:01:24 CEST 2007


> As an immutable type, tuple makes use of __new__.
>
> class MyTuple(tuple):
>      def __new__(cls, *args):
>          return tuple.__new__(cls, args)
>
> should work.
>
> Georg

strange.  not very consistent.




More information about the Python-list mailing list