subclassing tuple

Terry Reedy tjreedy at
Wed Sep 18 00:31:21 CEST 2002

"Douglas Zongker" <dougz at> wrote in message
news:H2LMGE.1JBF at
> I could do this with lists instead, but that means changing a lot of
> existing code that expects tuples (and I don't want these objects to
> be mutable!)

You might get what you want by starting with a list, doing your custom
modifications, and then 'return tuple(mylist)' or subclass thereof.


More information about the Python-list mailing list