functools puzzle

Michael Selik michael.selik at gmail.com
Wed Apr 6 14:39:03 EDT 2016


> On Apr 6, 2016, at 6:57 PM, George Trojan - NOAA Federal <george.trojan at noaa.gov> wrote:
> 
> The module functools has partial() defined as above, then overrides the
> definition by importing partial from _functools. That would explain the
> above behaviour. My question is why?

A couple speculations why an author might retain a vestigial Python implementation after re-implementing in C: to provide a backup in case the C fails to compile or to simply provide an easier-to-read example of what the C is doing.




More information about the Python-list mailing list