1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00
semantic/semantic-python/test/fixtures/3-02-defining-instance-method.py

6 lines
251 B
Python
Raw Normal View History

# CHECK-TREE: { Foo <- rec Foo = { identity <- rec identity = \self -> \x -> x; __semantic_prelude.type "Foo" __semantic_prelude.object #record { identity: identity } }; #record { Foo: Foo } }
2019-10-11 22:02:52 +03:00
class Foo():
def identity(self, x):
return x