Yes. We had discussions with the standard Python developers and Guido about it, 
actually. The language spec states that assignment is binding and if binding 
appears in a block (class body being block), all references to the name are 
local within the block. It was not clear whether it was a language spec bug or 
a implementation bug, but Guido ruled that it was a spec bug and the Python 
implementation is correct. We'll be fixing this soon.

Martin

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sanghyeon Seo
Sent: Sunday, March 26, 2006 3:01 AM
To: Discussion of IronPython
Subject: [IronPython] NameError

Following script raises NameError, but it shouldn't.

x = ''
class C:
    x = x

Seo Sanghyeon
_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to