3 ms·
I often find myself typing python3 import some_module dir(some_module) rather than trying to find functionality on the docs sites anymore
by 63 4y ago
I often find myself typing
python3
import some_module
dir(some_module)
rather than trying to find functionality on the docs sites anymore
- bogwog 4y agoLately i've been using ChatGPT for that instead and it's phenomenal. Previously, I'd just open up my site-packages folder in a dedicated Sublime window and just search the source code for what I wanted to know.
- heavyset_go 4y agoIf you haven't already or aren't aware, install IPython, use ipython3 as a replacement REPL and use the '?' or '??' operators to open the docs/definitions of the object you want to inspect. ipython3 import some_module some_module? # or some_module?? You can also type the object's name and hit tab to get a drop-down menu that will list its methods and attributes, like dir() with a better UX. Modules are objects, too.
- dragonwriter 4y ago> If you haven’t already or aren’t aware, install IPython, use ipython3 as a replacement REPL and use the ‘?’ or ‘??’ operators to open the docs/definitions of the object you want to inspect. you can read the docs in the standard REPL with help(object). And, of course, IDEs (or editors with decent Python support plugins) will do it on hover.