New submission from Thomas Robitaille:
The following code:
>>> "{0:s}".format([1,2,3])
no longer works in Python 3.4b1, and gives the following exception:
>>> "{0:s}".format([1,2,3])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: non-empty format string passed to object.__format__
This worked previously in Python 2.6-3.3:
>>> "{0:s}".format([1,2,3])
'[1, 2, 3]'
If this is a deliberate change, it should be included in the 'What's new in
Python 3.4'
----------
components: Interpreter Core
messages: 207459
nosy: Thomas.Robitaille
priority: normal
severity: normal
status: open
title: API breakage in string formatting with :s option
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20150>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com