Message266570
Serhiy, it seems as though _functools is always required for functools to work - heck, tests start to fail all over the place if it isn't available, because functools.reduce doesn't exist.
Subclassing _functools.partial is already tested for, so I wouldn't qualify it as an implementation detail myself. Moreover, I feel that we should try to (somewhat) keep both implementations identical - or close enough.
It seems that _pickle checks for _functools.partial, and that trying to pickle the pure Python version triggers the error in msg266530.
This probably doesn't matter for most (if not all) of cases where CPython is concerned. But I care about the ability for alternate implementations to work the same way.
Compromise: rename the current partial function to partial_func and keep it around ;-) |
|
Date |
User |
Action |
Args |
2016-05-28 19:36:26 | abarry | set | recipients:
+ abarry, rhettinger, ncoghlan, vstinner, serhiy.storchaka, xiang.zhang |
2016-05-28 19:36:26 | abarry | set | messageid: <1464464186.39.0.423703453541.issue27137@psf.upfronthosting.co.za> |
2016-05-28 19:36:26 | abarry | link | issue27137 messages |
2016-05-28 19:36:26 | abarry | create | |
|