TypeError when trying to use functools.partial with a class method in Python 3.9
Quick question that's been bugging me - I'm working with a `TypeError` when using `functools.partial` to create a callable from a class method in Python 3.9. I have a class defined like this: ```python class Calculator: def add(self, a, b): return a + b ``` I want to create a new function that always adds a specific number, say 5, to the second argument. My attempt looks like this: ```python from functools import partial calc = Calculator() add_five = partial(calc.add, 5) result = add_five(10) ``` However, when I run this code, I get the following behavior: ``` TypeError: add() missing 1 required positional argument: 'b' ``` I expected `result` to return 15, but instead, I'm getting this behavior. I've tried adding `staticmethod` and `classmethod` decorators but they don't seem to resolve the scenario. Can anyone guide to understand why this happens and how to fix it? I really want to use `partial` for this as I think it would keep my code clean. Thanks in advance! For context: I'm using Python on Ubuntu. Has anyone else encountered this?