Created
November 9, 2011 16:42
-
-
Save herberthamaral/1352020 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def minhafunc(argumento1, argumento2): | |
if argumento1 > argumento2: | |
raise Exception('Erro: argumento1 precisa ser menor que argumento2') | |
args = (3,2) | |
minhafunc(*args) #erro | |
kwargs = {'argumento1':1, 'argumento2':2} | |
minhafunc(**kwargs) # ok :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment