J
jorjun
Anyone know of a Python source code utility PSU, to automatically add
keyword arguments to method calls that don't have them? :
BEFORE
def get_total(books, binders, hinges):
return (binders.total + hinges.total - books.cost)
def print_total():
print get_total(novels, covers, brackets)
AFTER
.....
def print_total():
-- print get_total(novels, covers, brackets)
++ print get_total(books=novels, binders=covers, hinges=brackets)
keyword arguments to method calls that don't have them? :
BEFORE
def get_total(books, binders, hinges):
return (binders.total + hinges.total - books.cost)
def print_total():
print get_total(novels, covers, brackets)
AFTER
.....
def print_total():
-- print get_total(novels, covers, brackets)
++ print get_total(books=novels, binders=covers, hinges=brackets)