[Python-ideas] clear() method for lists
Matthew Russell
matt.horizon5 at gmail.com
Thu Feb 11 16:21:27 CET 2010
this seems to work in python 2.x and python3.1, although I suspect it's a
bug.
>>> t = (1, 2)
>>> t += (3,)
>>> t
(1, 2, 3)
On 11 February 2010 14:57, Oleg Broytman <phd at phd.pp.ru> wrote:
> On Thu, Feb 11, 2010 at 09:51:42AM -0500, Gerald Britton wrote:
> > Say you had a problem where you started with a basic tuple, then
> > needed to add items to it to produce some result. Now suppose you
> > want to do that repeatedly. You don't want to disturb the basic
> > tuple
>
> You can never "disturb" a tuple - it's a read-only object.
>
> Oleg.
> --
> Oleg Broytman http://phd.pp.ru/ phd at phd.pp.ru
> Programmers don't die, they just GOSUB without RETURN.
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
--
Cheers,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100211/daead258/attachment.html>
More information about the Python-ideas
mailing list