__name__ for partial functions

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?

I'm not sure what you're proposing. What should its `__name__` be set to? If you have a value you want its `__name__` to be, you can just set it yourself.

I'm not sure what you're proposing. What should its `__name__` be set to? If you have a value you want its `__name__` to be, you can just set it yourself.
participants (2)
-
Henry Harutyunyan
-
Kevin Mills