On 2011-08-23, Ethan Furman <et...@stoneleaf.us> wrote:
> Seebs wrote:
>> On 2011-08-23, Roy Smith <r...@panix.com> wrote:
>>>           logger.error("FAILED: '%s{50}', '%s', %s, %s" % (message,
>>> route, params, e.code))

>>> does anything like this exist?

>> %.50s

> That's not working in 2.7 or 3.2.

Huh.

        Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
        [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
        Type "help", "copyright", "credits" or "license" for more information.
        >>> print "%.5s" % ("hello there, truncate me!")
        hello

-s
-- 
Copyright 2011, all wrongs reversed.  Peter Seebach / usenet-nos...@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to