diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-11 12:10:35 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-11 12:10:35 +0100 |
commit | 18ceb7055b43d158e46ff6d0a0389bc3cd05e5d5 (patch) | |
tree | f3b1ad5d9c242a8aec5c0dc58b876e6f57529f05 /tests/basics/subclass_native_cmp.py | |
parent | a7a1a38df43958a267410d333f495db56a8b0902 (diff) | |
parent | eea01186547f0f1568ea1c8f002da4e33b7b0e46 (diff) | |
download | micropython-18ceb7055b43d158e46ff6d0a0389bc3cd05e5d5.tar.gz micropython-18ceb7055b43d158e46ff6d0a0389bc3cd05e5d5.zip |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'tests/basics/subclass_native_cmp.py')
-rw-r--r-- | tests/basics/subclass_native_cmp.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/subclass_native_cmp.py b/tests/basics/subclass_native_cmp.py new file mode 100644 index 0000000000..1a095bfa1a --- /dev/null +++ b/tests/basics/subclass_native_cmp.py @@ -0,0 +1,9 @@ +# Test calling non-special method inherited from native type + +class mytuple(tuple): + pass + +t = mytuple((1, 2, 3)) +print(t) +print(t == (1, 2, 3)) +print((1, 2, 3) == t) |