Automatic keyword argument source change?

jorjun jorjun at gmail.com
Thu Jul 10 08:13:16 EDT 2008


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)




More information about the Python-list mailing list