コード例 #1
0
ファイル: scripts1.py プロジェクト: cbourgeois/gnatcoll
import M

print(M.hello())
print(M.hello("Manu"))

print("%1.2f" % M.print_float(1.2))

c = M.C1 (2)
print(c.method ("foo"))

print(c.id)
print(c.name)

c.prop = 5    # Calling setter
print(c.prop) # Calling getter

try:
    print(c.wo_prop) # Error
except AttributeError:
    print("Expected exception when getting wo_prop")

l = M.MyList((1, 2))
print(l)
print(l.dump())