7 Sep
2021
7 Sep
'21
6:49 a.m.
functools introduces partial function. As I can see from the implementation, partial functions are instance of `partial` class, and that __call__ is used to "emulate" a function call. On the other hand I guess people usually treat those as ordinary functions. The thing here is that for functions people expect to see the __name__ attribute defined and it can be useful in many cases. Why partial does not have a __name__ property and why is it not a good idea to add one?