2.3 list reverse() bug?

Arthur ajsiegel at optonline.com
Fri Dec 26 00:59:12 CET 2003


On Thu, 25 Dec 2003 05:17:47 -0600, Bjorn Pettersen
<bjorn.pettersen at comcast.net> wrote:


>There is a module called copy that let you get the semantics that you're 
>looking for. I've never used it in my 6+ years of Python programming, since 
>it normally indicates the presence of flawed logic <wink>.
>

Why would you mention this in the context here?

I remain confused by this oft repeated mantra regrading the use of
copy. Are  you saying that the need to copy a list indicates flawed
logic, or that doing it otherwise than by list[:] is flawed?

I have to assume the latter, but am willing to learn otherwise.

But if the latter....

Why even mention copy in this context?

But once mentioned, I need to ask then why the use of copy(list) is
flawed.

That is, are there reasons beyond the obvious, of extra keystrokes.
And speed optimization, to the extentf it might be considered material
in a particular instance.

Art




More information about the Python-list mailing list