Blame tests/run/r_argdefault.pyx
|
Packit |
562c7a |
def swallow(name = None, airspeed = None, coconuts = None):
|
|
Packit |
562c7a |
"""
|
|
Packit |
562c7a |
>>> swallow(name = "Brian")
|
|
Packit |
562c7a |
This swallow is called Brian
|
|
Packit |
562c7a |
>>> swallow(airspeed = 42)
|
|
Packit |
562c7a |
This swallow is flying at 42 furlongs per fortnight
|
|
Packit |
562c7a |
>>> swallow(coconuts = 3)
|
|
Packit |
562c7a |
This swallow is carrying 3 coconuts
|
|
Packit |
562c7a |
"""
|
|
Packit |
562c7a |
if name is not None:
|
|
Packit |
562c7a |
print u"This swallow is called", name
|
|
Packit |
562c7a |
if airspeed is not None:
|
|
Packit |
562c7a |
print u"This swallow is flying at", airspeed, u"furlongs per fortnight"
|
|
Packit |
562c7a |
if coconuts is not None:
|
|
Packit |
562c7a |
print u"This swallow is carrying", coconuts, u"coconuts"
|