r/transprogrammer • u/Big1com1cs • Feb 16 '21
Getting better with Python Libraries
Idk if this is the best place to post this but I felt like I may as well ask. Is there a way to get generally better with python libraries? Specifically like being able to pick them apart and figure out basic things about them without needing to look them up. Thanks in advance for any advice
42
Upvotes
17
u/TempuraGaebora Feb 16 '21
Docstrings are your friend. When I was first learning I used Spyder as my IDE, which looks up and displays docstrings for you while you're typing. If you're working interactively with the REPL, you can call the
helpfunction on the module/function/object you want to know about and it'll display the docstring for you. Hope that's helpful :)5
u/cattykatrina Feb 16 '21
Don't know your python skill level. but after a while, (reading docstrings, trying to understand functionality, arguments types and output etc.) I got tired and started reading the code itself. It was and still is tiring and pretty hard, but it can give you an understanding and awareness of the gaps in docstrings(Either because of english language itself or the writers' limitations). I feel like the whole thing gave me a new level of mastery over the language.
9
u/[deleted] Feb 16 '21
Honestly I found it helpful to google EVERYTHING for quite a while. Why? There's a stack overflow solution for the thing you're trying to do, and it'll be 10x better than what you would've done. Over time you learn way more than you would have by solving everything yourself.
4
u/NBNoemi Feb 16 '21
Along with everything else you'll get passively better with practice. There are a lot of informal standards so every time you learn a library some other libraries will become easier to pick up because they work on similar use assumptions.