does Python support some kind of "casting"
tejarex at yahoo.com
Fri Mar 15 14:58:52 CET 2002
"Tino Lange" <tl_news at nexgo.de> wrote in message
news:a6shn9$9l6$1 at crusher.de.colt.net...
> Duncan Booth wrote:
> > Yes, that will make a copy. But copying a list is a pretty
> > operation, so no, it isn't really horribly inefficient. Have you
> > and identified this as a bottleneck? How long are your lists
> 3600 Elements each.
The copy requires 4*3600+10(about) bytes - about 15000 - and less than
a millisecond with two allocations for header and list of pointers and
two machine-code memmove instructions. Probably not a bottlenect
operation on any modern machine.
Terry J. Reedy
More information about the Python-list