PyCharm: Quick refactoring

One thing I really like in PyCharm is you can do quick refactoring very easy and PyCharm will settle (almost) all the stuff for you. For example, here is me trying to refactor a single string of command to be something more sophisticated:

PyCharm quick refactoring

As you can see, I can take the whole string and put it in a variable, I then proceed to take some part of the string, in this case is the filename of the config source, into another variable. After that, I make it able to switch between different configs using the if statement, all using PyCharm quick refactoring features.

Pos ini dipublikasikan di post. Tandai permalink.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google

You are commenting using your Google account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s