A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/046708.html below:

[Python-Dev] 2.4a2, and @decorators

[Python-Dev] 2.4a2, and @decoratorsGuido van Rossum guido at python.org
Tue Aug 3 16:32:32 CEST 2004
> In practical terms, all this means is that I'll just use the hacked
> syntax until I no longer need to support Python 2.3.

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)?

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4