For Guido and developers Python.

Quiet quiet at hotbox.ru
Wed May 14 10:41:55 EDT 2003


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".

Example:

f(lst_List [i:j] aslink)

It is possible to make so:
1. When it is necessary to make a copy of object obviously:
"ascopy":

a = b ascopy

2. It is not necessary to create a copy of object.
The obvious reference to object: aslink:

a = b aslink

f(lst_List [i:j] aslink)

3. In other cases as before.


                             Yours faithfully, Anton.


mailto:quiet at hotbox.ru
http://freezope2.nipltd.net/quiet
http://www.i-quiet.narod.ru






More information about the Python-list mailing list