[Python-3000] Alternatives to 'outer'

Antoine solipsis at pitrou.net
Fri Oct 13 10:19:04 CEST 2006


> So let me spit out some possible suggestions in terms of keywords:
>
> 	ref
> 	refer
> 	share
> 	sharing
> 	common
> 	use
> 	using
> 	borrow

I think you are trying too hard.
Those proposals are all semantically ambiguous.
"ref" / "refer" seems to hint at the notion of reference or pointer (and
the "weakref" module already uses those words).
"share" / "sharing" seems to hint at a shared library thing.
"use" and "using" are used in other languages to import namespaces, or
define options.
"common" and "borrow" looks like it might be some kind of totally global
symbol (a global constant, whatever).

IMHO "nonlocal" is fine, it tells just what it does, not more, not less;
it is part of the same kind of vocabulary as "global", which is the right
thing as they are really similar notions.

Also, "nonlocal" is probably quite rare as an identifier in Python
programs (because of the negation: you hardly ever name a variable
"nonsomething"), which won't be the case with "ref", "share", "common",
etc.





More information about the Python-3000 mailing list