Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0794fe0

Browse files
committed
Add NEWS and docs for #9856
1 parent 2cd8ce4 commit 0794fe0

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Doc/library/functions.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,10 @@ are always available. They are listed here in alphabetical order.
543543
:exc:`TypeError` exception is raised if the method is not found or if either
544544
the *format_spec* or the return value are not strings.
545545

546+
.. versionadded:: 3.4
547+
``object().__format__(format_spec)`` raises :exc:`TypeError`
548+
if *format_spec* is not empty string.
549+
546550

547551
.. _func-frozenset:
548552
.. function:: frozenset([iterable])

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #9856: Replace deprecation warinigs with raising TypeError
14+
in object.__format__. Patch by Florent Xicluna.
15+
1316
- Issue #16597: In buffered and text IO, call close() on the underlying stream
1417
if invoking flush() fails.
1518

0 commit comments

Comments
 (0)