hai shi <shihai1...@126.com> added the comment:
> It looks like you imported the functools module twice and have two different > classes functools.partial. When you try to import one of them, you found the > other one. You are right. Serhiy:) The key point is `import_helper.import_fresh_module()`. ``` import functools from test.support import import_helper partial = functools.partial new_functools = import_helper.import_fresh_module('functools', fresh=['_functools']) new_partial = new_functools.partial assert(partial == new_partial) ``` Succeed in master, failed in PR23405. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42410> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com