On Thu, 13 Apr 2000, Vladimir Marangozov wrote: > >>> def this(): > ... sucks = "no" > ... > >>> this.sucks = "yes" > >>> > >>> print this.sucks > 'yes' > > Why on earth 'sucks' is not the object defined in the function's namespace? > Who made that deliberate decision? Clearly 'this' defines a new namespace, > so it'll be also legitimate to get a NameError, or to: > > >>> print this.sucks > 'no' > > Don't you think? No. >>> def this(turing_machine): ... if stops(turing_machine): ... confusing = "yes" ... else: ... confusing = "no" ... >>> print this.confusing <Python kills itself out of mercy> -- Moshe Zadka <mzadka@geocities.com>. http://www.oreilly.com/news/prescod_0300.html http://www.linux.org.il -- we put the penguin in .com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4