python3: 'where' keyword

André andre.roberge at gmail.com
Sat Jan 8 11:01:43 EST 2005


At the risk of generating controversy, here's another type of example:

def gcd(a, b):
where:
a: int, b: int
return c where:
c: int
while a:
a, b = b%a, a
return b

More can be found at http://aroberge.blogspot.com

Andre




More information about the Python-list mailing list