[Python-ideas] a in x or in y

Boris Borcic bborcic at gmail.com
Thu Feb 13 15:38:31 CET 2014


Nick Coghlan wrote:
>
>  >> In linguistics, there's a concept called "garden path" sentences -
>  >> these are sentences where the first part is a grammatically coherent
>  >> sentence, but by *adding more words to the end*, you change the
>  >> meaning of words that appeared earlier.
>  >
>  >
>  > Are you trying to say "X in Y and" forms a complete expression?? And couldn't the lexer recognize "and in"
> and cognates as single tokens anyway, like it apparently does presently for "is not" ?
>
> Yes, there are ways around the technical limitation - the point of the rest of the post was to make it clear
> that was largely irrelevant, because it would still be too hard to read.
>

And my point was that your argument was rather unconvincing, for a variety of reasons going from the 
difference between indefinite lookahead and (rectifiable) two token lookahead, to the rarity of actual garden 
path sentences that's evidenced by the fact that the single example you cite is many decades old.

Cheers, Boris Borcic


---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com




More information about the Python-ideas mailing list