Alternative dictionary output format?

Jeff Epler jepler at inetnebr.com
Fri Jun 4 12:33:30 EDT 1999


On Fri, 04 Jun 1999 14:55:42 GMT, rael at my-deja.com
 <rael at my-deja.com> wrote:
>s = "%(href)s/foo/bar?x=%m&y=%n"

(he wants to only substitute the %(href) and not the rest)

s = "%(href)s/foo/bar?x=%%m&y=%%n"

i.e., double the percents you want to have not interpolated at this stage
of the game.

A clever regular expression might be able to do this for you, but the way
to write it 100% bulletproof escapes me.

Jeff
-- 
\/ http://www.slashdot.org/                      Jeff Epler jepler at inetnebr.com
I just forgot my whole philosophy of life!!!




More information about the Python-list mailing list