Variables and their domain

Terry Reedy tjreedy at
Fri Nov 30 00:36:39 CET 2007

"Jose Ignacio Gisbert" <jigisbert.etra-id at> wrote in message 
news:007b01c8327c$9fcffa40$2000a8c0 at depid.local...
| I have one doubt, in my applciation I have a method (Method1) which has
| other method (Method2) inside of it.

You have a function inside a function.  In Python, methods are functions 
bound to classes.

|            Method1
|                        Lista=a,b,c,d.

That makes a tuple, not a list.  Do
    lista = [a,b,c,d]
to make a list that you can modify inside an inner function using item or 
slice assignment or modify-in-place methods

|                        Lb=listbox
|                        Method2
|                                   Lista=e,f,g..   -->error!

         lista[:] = [e,f,g]
will replace the contents of lista

Good luck.


More information about the Python-list mailing list