File: scripts1.py

package info (click to toggle)
libgnatcoll 1.6gpl2014-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 22,760 kB
  • ctags: 10,162
  • sloc: ada: 132,013; ansic: 94,291; python: 3,762; sh: 2,781; cpp: 1,394; makefile: 342; xml: 31; sql: 6
file content (20 lines) | stat: -rw-r--r-- 326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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")