On Sun, 2008-11-23 at 11:24 +0100, Marco Buttu wrote:

> >>> def chlist(lst):
> ...     print id(lst)
> ...     lst.append(100)
> ...     print lst, id(lst)
> ...     lst = 50
> ...     print lst, id(lst)
> ... 
> >>> lst = list()
> >>> id(lst)
> 3084218188L
> >>> chlist(lst)
> 3084218188
> [100] 3084218188 # L'oggetto e' sempre lo stesso
> 50 135720172 # lst e' un altro oggetto

lst locale...

_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a