[Python-Dev] 2.4a2, and @decorators

Barry Warsaw barry at python.org
Tue Aug 3 16:53:36 CEST 2004


On Tue, 2004-08-03 at 10:32, Guido van Rossum wrote:

> I don't understand why you prefer your hack over the established way
> to do decorators pre-2.4, which is
> 
>   def foo(): ...
>   foo = staticmethod(foo)
> 
> This works across releases (including IronPython), doesn't require any
> magic, is documented, etc.  So if your main constraint is that it be
> implementable pre-2.4, you already have a solution.  Isn't that much
> better than spending effort on hacks based on sys.settrace (which are
> surely going to produce bafflement from users who aren't familiar with
> that implementation hack)?

+1

-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 : [Python-Dev] 2.4a2, and @decorators

	
  • Next message: [Python-Dev] 2.4a2, and @decorators
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  • More information about the Python-Dev mailing list

    Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

    Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant