Env tests moved to community.

This commit is contained in:
Dmitry Trofimov
2014-08-12 22:18:01 +02:00
parent 8b8d2a1c64
commit c12bbfe12f
40 changed files with 343 additions and 1811 deletions
+26
View File
@@ -0,0 +1,26 @@
class A:
def __init__(self, z):
self.z = z
def foo(self, x):
y = 2 * x + self.z
return 1 + y
def zoo(x):
y = int((x - 2) / (x - 1))
return A(y)
print(zoo(2).foo(2))
try:
try:
print(zoo(1).foo(2)) #we got ZeroDivision here
finally:
print(zoo(0).foo(2))
except:
pass
a = zoo(-1)
print(a.foo(2))