PEP 318 - Function Modifier Syntax
Gerrit Holl
gerrit at nl.linux.org
Wed Jun 11 14:33:44 EDT 2003
Andrew Walkingshaw wrote:
> > 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):
How about "def f() alteritaccordingto (decorator1, decorator2):"
No, I am +1 on def foo() as bar, +0 on def bar(foo()) and -1 on
all other syntaxes I have seen.
When I read 'def foo() as bar', I read 'def foo() as a bar', thus
'def foo() as a bar_object' or 'def foo() as an instance of bar'.
Maybe Bar should be a class, so that using multiple inheritance,
foo will be isinstance(foo, bar). This will also easy checking
'am-i-a-classmethod' easier.
yours,
Gerrit.
--
173. If this woman bear sons to her second husband, in the place to
which she went, and then die, her earlier and later sons shall divide the
dowry between them.
-- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
http://www.sp.nl/
More information about the Python-list
mailing list