[Python-Dev] Re: Re: Call for defense of @decorators (original) (raw)
Walter Dörwald walter at livinglogic.de
Mon Aug 9 12:38:58 CEST 2004
- Previous message: [Python-Dev] Re: Re: Call for defense of @decorators
- Next message: [Python-Dev] Re: Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Christian Tismer wrote:
Anthony Baxter wrote:
Mark Russell wrote:
I too like |. It is not quite as visible as @, but I don't think that's a serious problem, and not breaking ipython and other tools is a big win. I just tried implementing this change, and all the tests still pass (not a big surprise, but worth confirming I guess). To jump on the band-wagon - I can live with | as well. I was going to add it to the PEP rewrite, but I'll wait for a decision, to save myself the writing ;) Ok, I dislike special prefix chars at all, in a language that doesn't have this concept elsewhere (despite strings of course, but their prefixes are just regular chars),
appart from * and ** for argument passing.
I can't understand why we can't have a new keyword for decorators. If I remember correctly the introduction of yield didn't result in such a public outcry. We'd have to change our programs once if a variable names collides with the new keyword, but that's better than having to look at @s for the rest of our Python days.
So how about:
make classmethod def foo(cls, bar): ...
but the bar "|" appears a lot nicer than "@" to me. The bar is small and friendly, a small character for a small feature. With "@", I associate a powerful, magical Voodoo thing, something that I never expected to see in Python. Unless there is a real need, I'd say save "@" for a feature that really deserves such a powerful character.
Bye, Walter Dörwald
- Previous message: [Python-Dev] Re: Re: Call for defense of @decorators
- Next message: [Python-Dev] Re: Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]