简体   繁体   中英

Is there any way to see source functions in Python 3 Modules?

I'm fairly new to the language and am wondering if it's possible to see the functions that are being used in a certain Python 3 module?

Specifically the ones in the "ipaddress" module, thanks!

Is this what you are looking for?

https://docs.python.org/3/library/ipaddress.html

Generally, this type of information can be found in the languages docs.


As mentioned by John in the comments, implementations can be found here:

http://hg.python.org/cpython/file/3.5/Lib/ipaddress.py

In addition to getting the source code online, if you have a standard Python install it should be already sitting in an easily found location on your hard-drive. In my case it is found as a file in C:\\Python34\\Lib . Needless to say, if you go this route you need to be careful to not modify (or, even worse, delete) the file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM