On 6/22/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> However, I realised that there's an approach that is aesthetically pleasing
> and doesn't require using str() for this - simply consider the leading '{0:'
> and trailing '}' to be implicit if there are no braces at all in the supplied
> format string.
>
> Then you could do things like:
[examples with missing quotes omitted]And >>> "The implicit braces scare me, for I am weak".format(10) 'ValueError' (Assuming lenient mode, and that str.format raises ValueError for such a case) Michael -- Michael Urman http://www.tortall.net/mu/blog _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
