PEP 318 - Function Modifier Syntax
Andrew Walkingshaw
andrew-usenet at lexical.org.uk
Wed Jun 11 08:33:32 EDT 2003
In article <mailman.1055319116.28014.python-list at python.org>, Ian
Bicking wrote:
>> A fair point. So if you were able to choose any keyword for this task
>> that you wished, which would you choose?
>
> I think "as" is a perfectly good keyword, and no other suggestion I've
> seen is better. It reads well and it represents the underlying
> implementation fairly well. And "as" is already (kind of) a keyword, so
> all the better. It was an early suggestion, and a good one -- I don't
> know why people are working it over so much.
Because we haven't anything better to do? :)
Another option which comes to mind, assuming that these function
decorators work the way I think they do, is "applying":
def f(x,y,z) applying (decorator1, decorator2):
...
which would be equivalent to decorator2(decorator1(f(x,y,z))).
The main problem is that it's eight characters, but (to me at least)
it's entirely obvious what it means in this context - and it's not
already in use as a keyword.
- Andrew
--
Andrew Walkingshaw | andrew-usenet at lexical.org.uk
More information about the Python-list
mailing list