On 18 Feb 2005 01:25:06 -0800, "Serge Orlov" <[EMAIL PROTECTED]> wrote:
> Dan Sommers wrote: >> So my question is: Is there a way to pass options "through" a format >> string to the __str__ and __repr__ functions? For example, can I >> define my own alternate form for use with the '#' formatting >> character, so that '%#s' generates output according to SI guidelines? > You can create your own class FmtTemplate like string.Template was done > in python 2.4: http://docs.python.org/lib/node105.html That looks interesting. Perhaps that will push me into upgrading to 2.4 sooner rather than later (I'm *not* looking forward to rebuilding all my extensions...). Thanks you, Dan -- Dan Sommers <http://www.tombstonezero.net/dan/> Never play leapfrog with a unicorn. -- http://mail.python.org/mailman/listinfo/python-list