Esempio n. 1
0
#!/usr/bin/env python

from overload import Example

e = Example()

e.doit()
print(e)
print(e.doit(2))
e.doit("Hallo")
print(e)

print("------")

print(e.makeIt("xxx"), e)
print(e.makeIt("abc", 2), e)
print(e.makeIt("xyz", 3, "abc"), e)
from overload import Example

e = Example()

e.do_it()
print(e)
print(e.do_it(2))
e.do_it('Hallo')
print(e)

print('------')

print(e.make_it('xxx'), e)
print(e.make_it('abc', 2), e)
print(e.make_it('xyz', 3, 'abc'), e)
print(e.make_it('mnk', 4), e)
Esempio n. 3
0
#!/usr/bin/env python

from overload import Example

e = Example()

e.doit(); print e
print e.doit(2)
e.doit("Hallo"); print e

print "------"

print e.makeIt("xxx"); print e
print e.makeIt("abc", 2); print e
print e.makeIt("xyz", 3, "abc"); print e

Esempio n. 4
0
#!/usr/bin/env python3

from overload import Example

e = Example()

e.doit()
print(e)
e.doit("Hello")
print(e)

print("---------")
print("{} {}".format(e.makeIt("xxx"), e))
print("{} {}".format(e.makeIt("abc", 2), e))
print("{} {}".format(e.makeIt("xyz", 3, "abc"), e))