For Guido and developers Python.

Terry Reedy tjreedy at udel.edu
Wed May 14 14:16:56 EDT 2003


"Quiet" <quiet at hotbox.ru> wrote in message
news:mailman.1052923403.7539.python-list at python.org...
> 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.

NumPy, the numerical extensions, do just that.

> lst_List =.....
>
> def f (lst_List):
>         ....
>          f (lst_List [i:j])

Python is not Lisp.  As discussed earlier this week in two different
threads, either 1) pull items off a list, or one copy thereof, from
the *end* with l.pop(), or 2) iterate with an explicit index, or 3)
use 'for item in seq', which is the Python statement *designed* for
scanning a list from front to back.

Terry J. Reedy






More information about the Python-list mailing list