Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev
Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26
 

Index | Next | Previous | View Flat


nas at arctrix

Aug 24, 2004, 12:33 PM


Views: 915
Permalink
Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26

On Tue, Aug 24, 2004 at 11:56:13AM -0700, montanaro[at]users.sourceforge.net wrote:
> Modified Files:
> pep-0318.txt
> Log Message:
> List some possible reasons why arriving at consensus about
> decorators has been so hard (or impossible) to acheive. There are
> certainly more.

Perhaps you could add my reservation (objection is too strong a
word). I think decorators are not powerful enough given their high
syntactic profile. This could be rephrased as "if we are going the
use the @ sign then it should be able to do really cool things".

One idea is to have the compiler pass the AST for the function body
to the decorator function. The decorator could create new nodes in
the AST or modify existing ones. That would allow decorators to do
things like adding a try/except without introducing another function
call. The output of the decorator would be passed to the code
generator.

Neil
_______________________________________________
Python-Dev mailing list
Python-Dev[at]python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Subject User Time
Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26 nas at arctrix Aug 24, 2004, 12:33 PM
    Re: Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26 bac at OCF Aug 24, 2004, 12:57 PM
    Re: Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26 skip at pobox Aug 24, 2004, 12:59 PM
        Re: Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26 nas at arctrix Aug 24, 2004, 1:58 PM
            Re: Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26 pje at telecommunity Aug 24, 2004, 2:02 PM
        Re: Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26 greg at cosc Aug 24, 2004, 8:36 PM
    RE: Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26 fumanchu at amor Aug 24, 2004, 1:08 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.