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 <rep...@bugs.python.org> <http://bugs.python.org/issue28062> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com