by pythonscheme · 10y ago · 0 comments
If you have any trouble understanding it, go to the homepage: https://conceptcoaster.com/course/python-tutorial/ and work your way to magic methods.
and you can call them directly:
>>> (3).__neg__()
-3Python magic methods are not "magic" but are a very standard part of the language and are well documented.