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/2017-September/149577.html below:

[Python-Dev] Why aren't decorators just expressions?

[Python-Dev] Why aren't decorators just expressions? [Python-Dev] Why aren't decorators just expressions?Nick Coghlan ncoghlan at gmail.com
Sat Sep 16 08:21:03 EDT 2017
On 16 September 2017 at 21:22, Serhiy Storchaka <storchaka at gmail.com> wrote:
> Actually I remember somebody raised this question a year or two ago, but
> don't remember details.

Aye, I remember that as well, but apparently the thread title for the
discussion was sufficiently unrelated to the eventual topic that I
can't find it with Google.

Anyway, I think the outcome of that particular thread was something like:

1. The most reasonable-sounding enhancement request is the one to
allow subscripts: "@deco_group[deco_id]"
2. If we're going to relax the restrictions at all, it probably makes
sense to just allow arbitrary expressions
3. You can already use arbitrary expressions in practice by defining
"def deco(x): return x", and then writing
"@deco(whatever_expression_you_want)"
4. Nobody was motivated enough to actually implement the change and
then ask Guido if he'd changed his mind on the topic since 2004

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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