Partial string formatting?
op73418 at mail.telepac.pt
Tue Jan 21 17:18:55 CET 2003
Is there a simple way to do partial string formatting short of using
<string> % <mapping>
where if a key is not present in <mapping> it just leaves it untouched?
I thought of subclassing dict to hand out a default item, which it would
just be the requested key wrapped in %()s. Of course this only works if
the format code is s but not with other format codes or even more
Thanks in advance,
More information about the Python-list