[Python-Dev] Re: Decorators: vertical bar syntax

Barry Warsaw barry at python.org
Mon Aug 9 21:53:10 CEST 2004


On Mon, 2004-08-09 at 14:45, David Eppstein wrote:
> > I agree with Paul here.  The only reason I suggested | was to make life
> > easier for 3rd party tools.
> 
> But does it?
> 
> With @, a third party tool has an unambiguous indication of whether a 
> line is a decorator.  With |, it is not possible to recognize decorators 
> with a regular expression, instead you have to do some context-free 
> parsing to determine whether some previous line has an unclosed paren 
> (in which case the | is a binop rather than a decorator).

Oh ick.  I hadn't thought of that, but if that's going to cause a
problem given the current grammar (and I can't test that atm), then I'm
going to have to retract my support for |.

-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] Re: Decorators: vertical bar syntax

	
  • Next message: [Python-Dev] Re: Decorators: vertical bar syntax
  • 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