[Python-Dev] classes and cell variables question
tomer filiba
tomerfiliba at gmail.com
Fri Dec 29 21:30:23 CET 2006
More information about the Python-Dev mailing list
Fri Dec 29 21:30:23 CET 2006
- Previous message: [Python-Dev] classes and cell variables question
- Next message: [Python-Dev] classes and cell variables question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/29/06, Jeremy Hylton <jeremy at alum.mit.edu> wrote: > def spam(): > x = 5 > class eggs(object): > x = 6 > def spam(self): > return x > return eggs > > spam()().spam() should return 5. > the question that arises is -- is this what we wanted? if i had to read such code, where i can't (easily) tell where "x" is bound to, i wouldn't be content, to say the least. -tomer
- Previous message: [Python-Dev] classes and cell variables question
- Next message: [Python-Dev] classes and cell variables question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list