At 08:19 AM 6/14/2008 +0200, Cesare Di Mauro wrote:
Assignament must work on the object's namespace, of course:

def foo(a):
  on a:
     x += 1
     print x
    will be equivalent to:

def foo(a):
  a.x += 1
  print a.x

Er, you need a syntactic disambiguation here to distinguish attributes from locals or globals:

def foo(a):
  on a:
     .x += 1
     print .x

Otherwise, this leads to all sorts of craziness. You'd also have to restrict what could be referenced in a nested "on" block, in order to avoid further ambiguities.

_______________________________________________
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