[New-bugs-announce] [issue21547] '!s' formatting documentation bug

Joshua Landau report at bugs.python.org
Wed May 21 08:39:19 CEST 2014

New submission from Joshua Landau:

In the docs for 2.x about the formatting syntax:


it says

    "Two conversion flags are currently supported: '!s' which calls str() on the value, and '!r' which calls repr()."

but for unicode formatters, '!s' calls unicode() instead.

See http://stackoverflow.com/questions/23773816/why-python-str-format-doesnt-call-str for the question that found this.

assignee: docs at python
components: Documentation
messages: 218863
nosy: Joshua.Landau, docs at python
priority: normal
severity: normal
status: open
title: '!s' formatting documentation bug
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list