Confused about pep 318
Ville Vainio
ville at spammers.com
Thu Aug 5 15:16:44 EDT 2004
>>>>> "Anthony" == Anthony Baxter <anthonybaxter at gmail.com> writes:
Anthony> On Thu, 05 Aug 2004 13:29:29 -0400, Peter Hansen <peter at engcorp.com> wrote:
>> I'll make another donation to PSF if the final decorator syntax
>> does not Perlishly use arbitrary punctuation as the @ syntax
>> does.
Anthony> FFS. What exactly is "Perlish" about @? It's an unused
Anthony> symbol. That's all. It's hardly arbitrary - Java, for
Anthony> instance, already uses @ for the same thing.
The problem with @ as I see it (FWIW, of course) is that the new
syntax wastes @ for a minor feature. I wouldn't mind @[decorator],
which would allow reserving stuff like @private (compiler / type
inferrer / macro / whatever) for future extension of the language.
And "def decorator func(args):" is even worse. Most interesting
applications of decorators involve decorators with arguments...
--
Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list
mailing list