RELEASED Python 2.4, alpha 2

Chris Cioffi evenprimes at gmail.com
Fri Aug 6 15:18:54 EDT 2004


Thank you for this example Heiko.  I wasn't really clear on what the
blazes decorators were, let alone why different syntaxes were being
suggested.

Now that I'm at least registering on the clue-meter (just a little,
mind) I think the propsed syntax is fine.  It's only going to be used
at the function definition level, and its form makes you pay attention
that something odd is going on here.

My first reaction was that Python was turning into Perl.  Now I think
it's good that the syntax is a little jarring and discordant.  I think
most people won't use function decorators very often so slapping us in
the face when it does happen is the visual clue we need to pay closer
attention.

Chris

On Thu, 5 Aug 2004 18:51:08 +0200, Heiko Wundram <heikowu at ceosg.de> wrote:
[snip]
> 
> I don't think they try to solve all the things you state. Rather, it's only
> about general function mangling at compile time. Whatever you need to do for
> function mangling, that's up to you.
> 
> And, at least for me, as I stated elsewhere, the syntax is just fine. I've
> tried it out yesterday, porting some code to 2.4a2 which used thread locks
> extensively, and just writing a little class InstanceSynchronizer() which is
> just a Class which defines __call__ (when decorating a function) and gets the
> first parameter from the function call to acquire an instance specific lock
> is certainly the right way to go.
[snip]


-- 
Still searching for an even prime > 2!



More information about the Python-list mailing list