[issue1714448] if something as x:

Jervis Whitley report at bugs.python.org
Sun Mar 15 06:58:32 CET 2009


Jervis Whitley <jervisau at gmail.com> added the comment:

> Matthew suggested ~= instead of -> or "as".

Try the patch, you can make changes (for those that aren't aware) 
by changing the token in Grammar/Grammar to whatever you wish. It is easy
to do and you need only recompile after this step. 

example:

    assexp: xor_expr ['->' xor_expr] 

could become

    assexp: xor_expr ['magic' xor_expr]


    >>> 'hello' magic words
    'hello'
    >>> words
    'hello'


Note that Mr Barnett may need to look at other fixes to get
his '~=' idea off the ground (tokenizer.c and specifically adding a new
token)

I've recommended that we close this issue.

Cheers,

Jervis

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1714448>
_______________________________________


More information about the Python-bugs-list mailing list