porcupine
porcupine copied to clipboard
refactoring temporary value to variable
print(person.get_name().upper())
, select person.get_name().upper()
, press some key combination. Should automatically become:
name = person.get_name().upper()
print(name)
I.e. it puts it to a new variable. It might be possible to even guess a reasonable name for the new variable, e.g. by looking at what's before (
and after the .
.
This will be a bit language specific, because how exactly you make a new variable depends on language. It would probably be quite unusable in e.g. C, where you need to specify the type of the variable, unless we can somehow ask the langserver.