Commit f0fe2a22 authored by gsamain's avatar gsamain

PEP-8 indent for type inference test

parent 1e402dfa
cdef cypclass SomeMemory:
int a
int a
void __init__(self, int a=0):
self.a = a
void __init__(self, int a=0):
self.a = a
SomeMemory __add__(self, SomeMemory other):
return SomeMemory(self.a + other.a)
SomeMemory __add__(self, SomeMemory other):
return SomeMemory(self.a + other.a)
SomeMemory __iadd__(self, SomeMemory other):
self.a += other.a
SomeMemory __iadd__(self, SomeMemory other):
self.a += other.a
SomeMemory __mul__(self, SomeMemory other):
return SomeMemory(self.a * other.a)
SomeMemory __mul__(self, SomeMemory other):
return SomeMemory(self.a * other.a)
cdef cypclass SomeSubMemory(SomeMemory):
int b
int b
cpdef bag():
o1 = SomeMemory()
o2 = SomeMemory(4)
o3 = SomeSubMemory(3)
o1 = SomeMemory()
o2 = SomeMemory(4)
o3 = SomeSubMemory(3)
o3 += o2
o1 = o2 * o3
return str(o1.a) + '\n' + str(o2.a) + '\n' + str(o3.a)
o3 += o2
o1 = o2 * o3
return str(o1.a) + '\n' + str(o2.a) + '\n' + str(o3.a)
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