On 28/04/2019 06:00, Nathan D'Elboux wrote:

> import urlGET
> # No information on urlGET as of yet
> 
> https://pypi.org/project/urlget/
> 
> this is a learning exercise for me so how do more experienced python coders
> approach modules like this, when you encounter a module that has sparse
> documentation how do you learn more about the functionality of said module?

Assuming a Google search has not thrown up any tutorials then I would:

Start with the interactive prompt.

>>> dir(urlGET)

That gives you a list of names from the module.

>>> help(urlGET)

Will print docstrings.

>>> help(urlGET.name)

Will print docstrings for the specified name.

>>> urlGET.name

will print a value/type message

>>> urlGET()

will execute a function or give an error telling
you how many parameters are expected.

>>> usrGET.name(1,2,3)

Gets some kind of value back - assuming it was
reported as taking 3 args. Or a type error if the
args are not suitable.

If all that fails then I probably start reading
the code... Or looking for a better documented
alternative module?


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to