Adding new parameters to a function definition easily

Is there a quick way to modify the list of parameters in function definitions (and subsequent calls)?  Say I want to change the order parameters are listed in, add a new parameter, or remove a parameter.  Is there a refactoring option that will allow you to add/remove parameters easily?  Because I don't know what this is called, I'm not getting any luck searching for vague terms.  E.g. I want to turn

def mySum(a, b):

    return a + b

into

def mySum(a, b, c):

    return a + b + c

without having to search through the file and replace every instance manually

0
1 comment

Sounds like the menu item Refactor > Change Signature... is what you are looking for.

 

0

Please sign in to leave a comment.