classification
Title: Streamline repr(partial object)
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ebarry, ncoghlan, rhettinger, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-09-10 12:12 by ebarry, last changed 2016-09-10 12:40 by serhiy.storchaka.

Files
File name Uploaded Description Edit
functools_partial_repr_1.patch ebarry, 2016-09-10 12:12 review
Messages (2)
msg275628 - (view) Author: Emanuel Barry (ebarry) * (Python triager) Date: 2016-09-10 12:12
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.
msg275632 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-10 12:40
Similar issues: issue27541 and issue21861.
History
Date User Action Args
2016-09-10 12:40:13serhiy.storchakasetmessages: + msg275632
2016-09-10 12:12:43ebarrycreate