[Python-Dev] PEP_215_ (string interpolation) alternative EvalDict

Ka-Ping Yee ping@lfw.org
Mon, 14 Jan 2002 22:04:47 -0600 (CST)


On Mon, 14 Jan 2002, Skip Montanaro wrote:
>     $'BDFL = $sys.copyright.split()[4].upper()'
>     ---> ('BDFL = ' + str(sys.copyright.split()[4].upper()))
>
> How to you know when to stop gobbling after seeing a dollar sign in the
> string?

Parse using the "NAME trailer*" production in Grammar/Grammar.


-- ?!ng