J2 proposal: keyword
Anthony Baxter
anthonybaxter at gmail.com
Mon Aug 23 13:08:12 EDT 2004
On Mon, 23 Aug 2004 12:51:29 -0400, François Pinard
<pinard at iro.umontreal.ca> wrote:
> [Robert Brewer]
>
> > III. Choosing a keyword
>
> > If a keyword is to be chosen over @ or other punctuation, the question
> > remains, "which word should it be?" [...] The keyword [...] should not
> > be a word with a planned future. This rules out "with" and "as"
>
> All the contrary, being a word with a planned future may be an advantage, as
> long as using that word makes enough sense in itself, and given the syntax we
> use have no chance of clashing with the planned syntax.
>
> This might rule out "as" because not meaningful enough, but "with" might
> be pertinent enough for being used -- yet I'm not fully sure. The word
> "using" is surely not bad either :-), but would be yet another keyword.
Guido already has plans for 'with'. Using it in decorators would cause
confusion and ambiguity, e.g.
with foo:
.baz = 1
.banana(monkey=True)
def someentirelyunrelatedfunction(args):
....
with:
frobozulate
mangle(totally=True)
def decoratedfunction(arg):
....
Guido's already ruled out using 'as' in the context of decorators, and
I agree - don't overload keywords (or even, in the case of 'as',
not-really-keywords). In addition, 'as' already has plenty of other
meanings in, for instance, SQL, that are entirely unlike the meaning
envisaged here.
More information about the Python-list
mailing list