Calling dunder methods manually
kwpolska at gmail.com
Thu Apr 13 04:24:24 EDT 2017
On 13 April 2017 at 09:43, eryk sun <eryksun at gmail.com> wrote:
> The functions in the operator module implement abstract behavior (e.g.
> PyNumber_Add in CPython):
> >>> operator.__add__(C(), D())
Those functions also do not need underscores — operator.add is a
prettier way to achieve the same result.
Chris Warrick <https://chriswarrick.com/>
More information about the Python-list