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/047778.html below:

[Python-Dev] Re: Another approach to decorators.

[Python-Dev] Re: Another approach to decorators. [Python-Dev] Re: Another approach to decorators.David Abrahams dave at boost-consulting.com
Fri Aug 13 16:11:21 CEST 2004
Guido van Rossum <guido at python.org> writes:

>> > I think this is too far-fetched to consider as an alternative to the
>> > humble @decorator.
>> 
>> Maybe, but if you're still serious about improving support for
>> domain-specific embedded languages in Python you ought to give the
>> ideas another look.  If a reasonable syntax for decorators falls out
>> of a more general and useful mechanism, so much the better.
>
> How does
>
>     decorate <expr>, ...:
>        <block>
>
> improve support for domain-specific embedded languages?

I was thinking -- as well as I could through yesterday's allergy
attack -- more of the

      some-decorator:
          <block>

form, which allows people to create pseudo-statements of various
kinds.

Probably Bob I. is right that it doesn't help as much as it might if
<block> is executed before some-decorator is invoked.  That said,
maybe it's possible to pass the *code* for the block to
some-decorator in this scenario.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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