A counter-counter-proposal for PEP 236: #pragma( nested_scopes)
tim.one at home.com
Sat Mar 3 22:59:01 CET 2001
[Tim continues nagging Martin to write a PEP; Martin continues resisting]
[Martin von Loewis]
> I'm surprised that you evaluate the present based on what I think
> about the future.
I hope everyone who evaluates any proposed language feature does their best
to consider its likely implications as far into the future as they can. For
example, apart from explicitly identified unresolved issues in PEP 236, I did
my best to ensure that no addition, change, or deletion would *ever* be
needed to the rest of the PEP. I may not have succeeded (only time will
tell), but I did my best toward that end.
I want to see the same done for "directive" too -- along with every other
language feature that ever gets proposed.
Besides, no new language feature gets in without a PEP -- that's the rule we
all play by now. Why should "directive" be exempt?
> I think I've given a specification of the feature as implemented.
If true, it should be trivial to copy the text of your spec into a PEP. I
haven't seen the spec that I know of (I have seen a blossoming collection of
now hard-to-find-again postings that suggest different variants of
"directive"), and I'm not going to try reverse-engineering it from the patch.
Neither are the Jython developers, who don't normally look at CPython patches
at all. Etc. It needs a PEP.
> I'd happily add a specificiation of the directive statement (including
> plans that I have how it should look in Python 2.5.2 :) into PEP 236,
> as a section "Alternative Proposal" - if you allow me to do that.
No, because it doesn't make sense: if "directive nested_scopes" is accepted,
then PEP 236 moves into the Rejected section, along with all the text you put
into it. Then you'll need a separate PEP anyway. Play the game as if you
expect to succeed <wink>.
> I'd rather not author a new PEP, as the directive statement addresses
> the same problem as does PEP 236.
I don't know what the directive statement *is* in the absence of a PEP. How
many "atoms" does it support in your mind today? Is "atom" slang or a
deliberate reference to the Ref Man's grammar production of that name? If
the latter, what sense is there in allowing constructs like
directive [x+1 for x, y in module.foo()
if x > 3]
? That is, don't you think the syntax is overly permissive? Etc: if you
refuse to spell out your intent in a PEP, nobody has a basis for discussing
it beyond wishful thinking (or reverse-engineering the patch du jour, which
What *would* make sense in PEP 236 is to say that PEP 240 (whatever -- the
"directive statement" PEP) subsumes this-and-that parts of a
future_statement's functionality. The "directive statement" PEP needs to be
a separate entity not only for all the reasons given above, but because you
*don't* intend for it to stop here. You need a separate PEP so that there's
one clear place to specify the additional bells and whistles that go beyond
the parts of future_statements it subsumes.
last-msg-from-me-on-this-until-there's-a-pep-ly y'rs - tim
More information about the Python-list