- Function argument can be secified by position or by keywrod.
Effective Python
def remidner(number, divisor):
return number % divisor
It can be called by
reminder(20,7)
reminder(20, 7)
reminder(number=20, divisor=7)
reminder(divisor=7, number=20)
This expression is confusing.
twitter_search('@obama', False, 20, True)
twitter_search('@obama', retweets=False, numtweets=20, popular=True)
Is slightly (microseconds) slower but is worth it for the code clarity and developer time savings.
Recommended Posts