tuple.index()

Roberto Bonvallet Roberto.Bonvallet at cern.ch
Thu Dec 14 08:52:24 EST 2006


Glenn Hutchings wrote:
> But there are situations where you might want to treat it as a
> read-only list.  E.g., an argument to a function, so that you can
> guarantee the function won't modify it.  In that case, it makes sense
> for the non-modifying methods (index() and count()) to be available.

list(my_arg).index(...)

-- 
Roberto Bonvallet



More information about the Python-list mailing list