A counter-counter-proposal for PEP 236: #pragma( nested_scopes)
tim.one at home.com
Fri Mar 2 18:41:42 CET 2001
> Hmm. Maybe that's why I so dislike Martin's attempt to hijack
> PEP 236: his current formulation of an alternative leaves only the raw
> names, without the __future__ or __possible_world__ qualifiers.
[Martin von Loewis]
> If *that* is the complaint, then the patch can be easily changed
> into reading
> directive future nested_scopes
> (future would be the directive name, and nested_scopes the atom
That would be much better to me. You need to write a PEP for this, though!
As is, "the patch" is a moving target and it's not at all clear how you
intend for this gimmick to evolve. For example, in other msgs I read today,
you're saying that "directive" *will* be a keyword, someday -- I had not
guessed that (to the contrary, the emphasis before today was on that
"directive" was *not* being made a reserved word). It needs a spec.
> In that case, I'd prefer /F's interpretation of the state
> of things, i.e.
> directive experimental nested_scopes
> since this does not talk about the future, but about the present (just
> as the future import does not talk about the future, but about
> directives that are presently needed).
nested_scopes talks about the future because, barring an unexpected disaster,
nested_scopes WILL BE the rule in 2.2, but ARE NOT in 2.1. "will be but are
not" == "the future", wrt any release (incl. 2.1) in which nested_scopes are
not yet the rule. "will be", "not yet", ... it's impossible to tell the
nested_scopes story without invoking the future! "experimental" misses the
point: this isn't an option, this isn't going away, it's not up for a vote,
it's a preview of Python's future.
"experimental" would make more sense for a "hmm, Guido can't make up his mind
whether Python wants this or not, so we're enabling it as an experiment --
let us know what you think!" kind of gimmick. The only good example of this
in Python's history I can recall is the now-defunct "access" statement (which
few people knew existed, because Guido was so wary of it that it was never
documented -- but that meant it didn't get a good trial, either).
"experimental" is a "use at your own risk" thing; "future" is a "*don't* use
at your own risk, because in a future release you'll be forced to live with
it" thing. Character encodings are neither of those, they're a "use or not,
it's up to you, the language will support whatever decision you make, today
and forever more" thing. Those distinctions are crucial for users: they're
the differences among facing the reality of personal mortality, trying Perl
for a week, and deciding whether to hit the snooze button when the alarm goes
without-a-pep-it-ain't-hep-ly y'rs - tim
More information about the Python-list