[docs] [issue21547] '!s' formatting documentation bug

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


New submission from Joshua Landau:

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

    https://docs.python.org/2/library/string.html#format-string-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>
<http://bugs.python.org/issue21547>
_______________________________________


More information about the docs mailing list