[Python-Dev] Re: 2.4a2, and @decorators (original) (raw)
Barry Warsaw barry at python.org
Wed Aug 4 17:07:52 CEST 2004
- Previous message: [Python-Dev] Re: 2.4a2, and @decorators
- Next message: [Python-Dev] Re: 2.4a2, and @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, 2004-08-03 at 21:07, Neil Schemenauer wrote:
That's not apparent to me. It seems to me that most people just got sick of the endless debate and tuned out. The people who had urgent need for the feature were probably a bit more persistent. Personally, I don't see the cost vs. benefit of the feature to be compelling. It seems there is not a lot you can do with a decorator without resorting to ugly hacks (e.g. messing with bytecode).
I disagree. I've written a lot of code that uses pre-pie decorators, but it's all fairly localized. It isn't spread out in every module, but it's contained, e.g., within a database package (wrap mutators in transaction handling decorators). Those use my own custom decorator, but in almost all other examples (in my own code -- I know others have different use cases), the decorators are built-ins like property, staticmethod, etc.
For me, the benefit is significant because while I would still continue to use this particular feature, I think the pie decorator syntax makes the code /more/ readable, or more readable in the right way and in the right place.
In general, I predict most Python code will continue to be blissfully unadorned with decorators.
-Barry
-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/python-dev/attachments/20040804/2436bbc3/attachment-0001.pgp
- Previous message: [Python-Dev] Re: 2.4a2, and @decorators
- Next message: [Python-Dev] Re: 2.4a2, and @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]