diff options
author | Robert Bradshaw <robertwb@google.com> | 2016-05-25 10:13:32 -0700 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2016-07-15 08:16:08 +0200 |
commit | d1a8e7d3cfac9a573453b98dcee3c46e0cf400b1 (patch) | |
tree | 4fc1f6e15b3fb54ce9e04afb514de1a427d36434 | |
parent | e5b83461e94fdcda6f233d83dc9af6b496120dd6 (diff) | |
download | cython-d1a8e7d3cfac9a573453b98dcee3c46e0cf400b1.tar.gz |
Test of __new__ on Python class.
-rw-r--r-- | tests/run/metaclass.pyx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/run/metaclass.pyx b/tests/run/metaclass.pyx index 189a6bb8c..d5464fb17 100644 --- a/tests/run/metaclass.pyx +++ b/tests/run/metaclass.pyx @@ -170,3 +170,11 @@ class Foo3(metaclass=Base3, a=0, b=0, **kwargs): >>> sorted(Foo3.kwargs.items()) [('a', 0), ('b', 0), ('c', 0)] """ + +class PyClassWithNew(object): + """ + >>> PyClassWithNew(389) + 389 + """ + def __new__(self, arg): + return arg |