String formatting char

Dale Strickland-Clark dale at riverhall.NOTHANKS.co.uk
Tue Nov 20 04:19:25 EST 2001


The string formatting operator, %, is a mighty powerful beastie when
used in mapping mode if the map is an object of your own.

You can even get substitution values from a database.

However, the %(x)y syntax isn't appropriate if there are already '%'
characters in the string or if, for some reason, you need to run the
substition twice on two different mapping objects.

You can get around it by substituting '%' for '%%' or translating to
another char and translating back afterwards but what a pain!

Is there some way to alter the format escape character from % to
something else?
--
Dale Strickland-Clark
Riverhall Systems Ltd



More information about the Python-list mailing list