For Guido and developers Python.

Fernando Perez fperez528 at yahoo.com
Wed May 14 13:37:35 EDT 2003


Quiet wrote:

> For Guido and developers Python.
> Hello.
> There is a problem.
> At creation of slice created the copy of elements of the list.
> For many recursive algorithms it would be convenient to create
> a slice as the alias (link) to the list.
> 
> Example:
> 
> lst_List =.....
> 
> def f (lst_List):
>         ....
>          f (lst_List [i:j])
> 
> Thus it is necessary, that the list was one. It is necessary that
> copies were not created.
> 
> For this purpose I suggest to enter a new key word "aslink".

This will never happen, for reasons you can find by looking at the archives.  If
your performance needs are that tight, look at Numeric.  It gives you arrays
with 'reference on slicing' semantics, amongst many other niceties (and they
are not only for numerical computing).

Cheers,

f




More information about the Python-list mailing list