Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python documentation
#1
Does anyone know where I can get a python 2 / 3 API? The documentation that ships with python is a disaster. Thanx for your help.
Reply
#2
you can use the embedded help function in python for docs
>>> help(int)
or you could look at the online docs
https://docs.python.org/3/library/index.html
Recommended Tutorials:
Reply
#3
Quote:The documentation that ships with python is a disaster.
How so, it's extremely verbose, but this is what any good programmer begs for.
Reply
#4
(Jun-11-2018, 02:26 PM)Larz60+ Wrote:
Quote:The documentation that ships with python is a disaster.
How so, it's extremely verbose, but this is what any good programmer begs for.

Maybe he means that he needs something more simple.. In that case I think it's better you rely on tutorials made by other people or even video tutorials because they explicitly focus on beginners, even then the documentation is supposed to be beginner friendly for the most part..
Reply
#5
One of the quick references that I most like for python 2 is this one, with the nice feature that you can see in which version was each feature introduced (nice when you need to work with archaeological systems)
Unfortunately I do not know an equivalent for python 3...
Reply
#6
(Jun-11-2018, 11:55 AM)j4py Wrote: Does anyone know where I can get a python 2 / 3 API? The documentation that ships with python is a disaster. Thanx for your help.
do you have an example of documentation, for something, that is not the disaster you think Python has?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#7
Hi all, when i was doing java in school the api was so structured it was easy to find a method or a class... i was looking for. the problem with python's doc is it is too cumbersome with lots of unwanted outputs (at least in my case). Say type string, and all i want is methods i can apply to strings, but i get all kinds of results that i have to go through which is why i said it is a disaster. Java's api is so simple and clear, if i want methods related to strings, that's all i get, which saves me time. thank you all for your replies.
Btw: help(x) is really the kind of a simple output i was looking for & shame on me for not thinking about that, but thanx for pointing it out for me.
Reply
#8
(Jul-05-2018, 09:37 AM)j4py Wrote: Say type string, and all i want is methods i can apply to strings, but i get all kinds of results that i have to go through which is why i said it is a disaster.
really?
>>> dir(str)
['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__
format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__get
slice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mo
d__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
 '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook
__', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center',
 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index
', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper',
'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', '
rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', '
strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
>>>
then use help, if you not able to navigate in the online docs
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#9
I don't know what you mean by Python API. You can write APIs, of many forms, in Python but I'm not aware of it having an API itself. Happy to learn otherwise.
I am trying to help you, really, even if it doesn't always seem that way
Reply
#10
(Jul-05-2018, 09:37 AM)j4py Wrote: Say type string, and all i want is methods i can apply to strings, but i get all kinds of results that i have to go through which is why i said it is a disaster.
Then you may using the wrong tool there a a lot of tools that will show method and help automatic.
REPL like IPython(or browser Jupyter notebook) | ptpython and editors to mention eg VS Code,PyCharm...ect.
The will show string method automatically when type . or for any other type used list,dict,int...ect.

What do i mean?
Here a collection as this can be useful for other to that may not know this.
VS Code:
[Image: PS6pe9.jpg]
Mouse over any code count() in this case,then IntelliSense step in.
[Image: prUCR0.jpg]
Cmder with ptpython:
[Image: oi6wqC.jpg]
Jupter Notebook:
[Image: RuThtG.jpg]
Cmder IPython:
[Image: AA12FQ.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Documentation Question Python 3.8 OldSubSailor 0 1,253 May-10-2020, 01:45 PM
Last Post: OldSubSailor

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020