[Python-3000] Draft PEP for outer scopes

Andrew McNamara andrewm at object-craft.com.au
Mon Nov 6 02:47:19 CET 2006


>Python, C/C++, JavaScript, Ruby, and Perl all have this in common:
>
>    A "global variable" is visible to the entire file and does
>    not belong to any particular function.

I note that you didn't say "a global variable is visible to the entire
application" - you've deliberately narrowed the definition to suit
your argument.

>> To be honest, I'm +0 on using "global" in the way GvR proposes. My
>> point is that python's globals are already different from other common
>> languages, and people cope with that.
>
>That does not constitute an argument in favour of anything.

Sigh. I'll spell it out more fully then:

Introducing new keywords is rude. Changing the behaviour of existing
language constructs is rude. To implement this proposal, we need to do one
or the other. Of the two, I lean very slightly in favour of making the
semantics of "global" slightly more complex, on the basis that they're
already slightly more complex than most other languages and people cope
with that.

>For example, Python's integers are already different from other common
>languages, because they have unlimited range.  That is not a reason to
>make "integers" include, say, floating point numbers.

I'm disappointed that you're resorting to straw-man arguments. I guess
that means we're done now.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/


More information about the Python-3000 mailing list