PyCharm 2017.1 Help

Extract Refactorings

In this section:

  • The way to extract constant, field, and variable refactorings are performed, depends on the setting of the Enable in-place refactoring check box in the Editor page of the Settings/Preferences dialog.
  • Extract refactorings are performed for the various expressions and blocks of code, including strings and substrings.

    Extract refactoring on substrings is supported for:

    • parts of strings with no formatting
    • parts of strings with concatenation via "+"
    • parts of strings with "%"-style formatting
    • parts of strings with "%()"-style formatting
    • new-style "str.format()" formatted strings

See Also

Reference:

Last modified: 26 July 2017