[Python-Dev] Re: Decorators: vertical bar syntax (original) (raw)
Barry Warsaw barry at python.org
Mon Aug 9 21:53:10 CEST 2004
- Previous message: [Python-Dev] Re: Decorators: vertical bar syntax
- Next message: [Python-Dev] Re: Decorators: vertical bar syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 : http://mail.python.org/pipermail/python-dev/attachments/20040809/265fc754/attachment.pgp
- Previous message: [Python-Dev] Re: Decorators: vertical bar syntax
- Next message: [Python-Dev] Re: Decorators: vertical bar syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]