PyCharm 2017.3 Help

Extract Method Dialog

Refactor | Extract Method

In the JavaScript context, the title of the dialog box may change to Extract Function.

NameIn this text box, specify the name of the function or method to be generated on the basis of the selected source code.
ParametersIn this area, select parameters to be passed to the new method/function.
  • If a parameter that is critical for the functionality of the new method is not selected, PyCharm will be unable to proceed with the refactoring.
Move Up/Down
Use these buttons to change the order of the parameters.
Signature previewIn this read-only field, view the declaration of the new method/function.
Output variablesThis read-only field shows local variables or parameters that have been changed within the method body, and will be returned by the method.
Last modified: 28 March 2018

See Also


Tutorials and Examples: