A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-April/023467.html below:

[Python-Dev] LOAD_NAME & classes

[Python-Dev] LOAD_NAME & classesPatrick K. O'Brien pobrien@orbtech.com
Tue, 23 Apr 2002 11:18:52 -0500
[Guido van Rossum]
> Why is the fact that this works:
>
>     x = 12
>     def f():
>         print x
>
> a "fortunate" side effect?  That's how the language works!

Yes. I got a fresh cup of coffee and smashed my head against a wall and now
my mental processes appear to be working again. At least, there's more
squeaking and rattling. My previous choice of words now appears to be
rather... unfortunate. <wink>

> I think you've got it backwards.  My complaint is that if f() above
> eventually grew 150 lines of unrelated code ending with an unrelated
> assignment to a local variable x, the breakage would show up at an
> unexpected point.  Except for this one, it's hard to make a change at
> the *tail* of a function that breaks something at the beginning!

Yes, I don't know what I was thinking. Maybe I need a donut. Thanks.

---
Patrick K. O'Brien
Orbtech





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