Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not automatically. The absence of type annotations means a human needs to double check the refactoring.

https://www.beust.com/weblog/2021/06/20/refactoring-a-dynami...



> You might think it’s obvious that you need to rename both A.f and B.f, but that’s just because this snippet is trivial.

In the general case, yes – but that's like saying “no termination analysis is possible because of the halting problem”. The IDE can safely refactor, unsafely attempt a refactor, and warn when it does the latter rather than the former.

Though I didn't know PyCharm didn't do that! That's dangerous; thanks for the warning.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: