[New-bugs-announce] [issue28062] Streamline repr(partial object)

Emanuel Barry report at bugs.python.org
Sat Sep 10 08:12:43 EDT 2016

New submission from Emanuel Barry:

This is a followup to #27137, where it was found out the repr of a partial object includes the module (i.e. 'functools') only if it's not a subclass. This behaviour is surprising at best. Attached patch streamlines the reprs of partial objects to always include the module.

Raymond, do you remember why this approach was taken? Looking at the code, it seems it was just the easiest way to go about it.

Side-note: I couldn't run the test suite since I ran into #28061, so I just did manual testing.

components: Library (Lib)
files: functools_partial_repr_1.patch
keywords: patch
messages: 275628
nosy: ebarry, ncoghlan, rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Streamline repr(partial object)
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file44529/functools_partial_repr_1.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list