Effective PyCharm (2021 edition) Transcripts
Chapter: The Editor
Lecture: Finding usages of functions and other symbols

Login or purchase this course to watch this video and the rest of the course contents.
0:00 One thing that's really important when you're working with code is to know how it's being
0:03 used, especially if you're going to make changes to it.
0:06 If you're going to add new features or you're considering removing it,
0:09 you think maybe maybe no one's using it?
0:12 Are you sure? So one really neat feature we can do on many symbols,
0:16 on variables, on functions on classes and so on as we can right click and
0:20 say find usages. If we hit that,
0:23 it will actually show us the code all the places in our code where that's being
0:27 used. So for example, here is the definition of get details and down here
0:32 in program share titles in that function or calling this line episode =service.get_details
0:38 and that's where it's being used.
0:40 Obviously in our simple little example here,
0:42 we only have one place where it's being used.
0:45 But in a real app, you probably have many places that you could jump around
0:48 and find where the codes being used.
0:50 So make sure that you use this to understand how the code being used across the entire project.