PEP 318 - Function Modifier Syntax

Erik Max Francis max at alcyone.com
Wed Jun 11 01:06:22 CEST 2003


Ian Bicking wrote:

> Note that "in" is already overloaded in the same way, i.e., it is an
> operator, and it is a keyword when used with "for".  I don't think
> this
> confuses anyone (though perhaps that's because there's more symmetry
> in
> the two meanings).

That's a good point, although note that the original poster's suggestion
segued into augmenting the meaning of the `is' operator, as well.

> I think "as" is a bit better, as it expresses what's going on a bit
> better (which isn't really declarative, and "is" feels very
> declarative).

I think that's a good summary.  `is' sounds like a declaration, whereas
`as' sounds more like declaring properties, which is what we're doing. 
Ideal would be a new keyword that really says what we mean, like `has',
but the inertia against adding new keywords makes that scenario far less
likely.

If the choice is between `is' and `as', I definitely choose `as'.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ I am become death, the destroyer of worlds.
\__/  J. Robert Oppenheimer (quoting Hindu legend)




More information about the Python-list mailing list