On 12/29/06, tomer filiba <[EMAIL PROTECTED]> wrote:
> On 12/29/06, Jeremy Hylton <[EMAIL PROTECTED]> 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.

It's obfuscated code. But there is no doubt that these are the
semantics that we wanted, and still want.


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to