Commit 9ed8b440 by Orell Garten Committed by Wenzel Jakob

Change __init__(self) to __new__(cls)

__init__(self) cannot return values. According to https://stackoverflow.com/questions/2491819/how-to-return-a-value-from-init-in-python __new__(cls) should be used, which works.
parent 5088364b
......@@ -23,7 +23,7 @@ The following Python snippet demonstrates the intended usage from the Python sid
.. code-block:: python
class A:
def __int__(self):
def __new__(cls):
return 123
from example import print
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment