Il giorno ven, 01-04-2005 alle 12:46 +0200, Ewald Ertl ha scritto: > Hi! > > on Fri, 01 Apr 2005 12:01:02 +0200 Adriano Varoli Piazza <[EMAIL PROTECTED]> > wrote : > --------------------------------------------------------------------------------------------- > > Adriano Varoli Piazza > > Adriano Varoli Piazza > def loadfromfile(fname): > Adriano Varoli Piazza > try: > Adriano Varoli Piazza > finput = file(fname, 'r') > Adriano Varoli Piazza > global lines > > global say, that lines is "global" defined. Otherwise as in your first > version the lines-List is defined local in the loadfromfile()-function. > (You can return the local list and assign it, where you call the > loadfromfile()- > function. )
I understand now. I got confused with "lists elements are changed in place"... Thanks -- Adriano Varoli Piazza The Inside Out: http://moranar.com.ar MSN: [EMAIL PROTECTED] ICQ: 4410132 _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor