This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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: abarry, ncoghlan, rhettinger, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-09-10 12:12 by abarry, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
functools_partial_repr_1.patch abarry, 2016-09-10 12:12 review
Messages (2)
msg275628 - (view) Author: Anilyka Barry (abarry) * (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
2022-04-11 14:58:36adminsetgithub: 72249
2016-09-10 12:40:13serhiy.storchakasetmessages: + msg275632
2016-09-10 12:12:43abarrycreate