Python文档? [英] Python Documentation?

查看:65
本文介绍了Python文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找Python文档的好地方。我真的很遗憾

为什么当我在Python中查找一个特殊的函数时,很难找到任何东西。我的例子是string()函数
字符串模块的
。为什么我不能去 www.python.org 并点击
在搜索上
,然后键入split,它将我带到split()函数
字符串模块的
?为什么要这么难?这是我在 www.python.org上搜索分割时获得的
...

http://search.py​​thon.org/query.html?...s&col=starship


这些命中大部分是针对re模块的,而不是字符串模块(我认为
应该是python的一部分,而不是模块,但我离题了。)

为什么不首先提出字符串模块的分割功能

首先是什么?


如果我现在正在搜索 www.perldoc.com 对于拆分,我得到......

< a rel =nofollowhref =http://www.perldoc.com/cgi-bin/htsearch?words=split&restrict=perl5.8.0target =_ blank> http://www.perldoc.com /cgi-bin/htsea...rict=perl5.8.0


Ri在那里,最受欢迎的是切口功能,多么方便。


如果我去 www.php.net 并在功能列表搜索中键入split,我

get ...

http://www.php.net/manual/en/function.split。 php


我甚至没有获得一个命中列表,它直接进入split()函数。

更方便。


我正在努力学习Python,因为我们在Zaurus上做了一些工作

并且有很多支持python模块的Zaurus ,我会b / b
喜欢用它。我也喜欢学习新语言。当我甚至想到用Python搜索任何东西时,它只会给我一个不好的口味。


我在错误的地方搜索?我在搜索页面上选择了错误的复选框吗?我很茫然。在python.org网站上找到

文件真的很难吗?


感谢您听到我的咆哮,我希望我是只是做某事

错了。我真的无法想象这样一个有组织的编程语言

在他们的网站上搜索如此可怕。

解决方案

在文章< LQ ******************** @ comcast.com>,

" Daniel R. Smorey Jr " < SM *** @ ptdprolog.net>写道:

我正在寻找Python文档的好地方。当我在Python中查找特定功能时,我真的很难找到为什么这么难找到任何东西。我的例子是字符串模块的split()函数。为什么我不能去 www.python.org 并点击
在搜索,然后键入拆分它,它带我到字符串模块的split()函数?


好​​吧,既然你知道这个函数是哪个模块,你可以去

文档页面,查找全局模块索引中的字符串并查找

split()。只需点击几下。


或者,甚至更容易,您可以启动解释器,并执行以下操作:

import string
help(string.split)




或,在命令行上,键入


pydoc string.split

为什么它必须这么难?这是我在 www.python.org 上搜索分割时获得的内容......

http://search.py​​thon.org/query.html?...s&col=starship

大部分热门歌曲都是对于re模块,而不是字符串模块(在我看来,它应该是python的一部分,而不是模块,但我离题了)。


大多数都是2.0以来。查看字符串方法。

http ://python.org/doc/current/lib/string-methods.html

为什么不首先提出字符串模块的分割功能




因为之前没有人要求它这样做?因为运行网站的时间有限的无偿

志愿者自己不需要这个功能而且从未意识到其他人可能会想要它?因为

字符串方法和re函数split()是同样好或更好的选项

首先返回?


虽然我同意应该有一个复选框选项只能搜索

当前的文档。


-

Robert Kern ke**@caltech.edu


在地狱的草地上增长很高

梦想的坟墓是否能够死亡。

- Richard Harter


" Daniel R. Smorey Jr. < SM *** @ ptdprolog.net>在消息中写道

新闻:LQ ******************** @ comcast.com ...

我我正在寻找Python文档的好地方。当我在Python中查找特定功能时,我真的很难找到为什么这么难找到任何东西。我的例子是split()函数




python本身的帮助是一个好的开始。

对于你的例子,试试


导入字符串

help(string.split)


无需访问网站。


Quoth Daniel R. Smorey Jr.::blockquote class =post_quotes>我正在寻找Python文档的好地方。当我在Python中查找特定功能时,我真的很难找到为什么这么难找到任何东西。我的例子是字符串模块的split()函数。 [...在python.org上搜索它... ...


对于全文搜索,请尝试< http://www.pydoc.org/>。


对于函数等等,有图书馆的索引

参考,< http://www.python.org/doc/ 2.3 / lib / genindex.html> ;.


[...]大部分点击都是针对re模块,而不是字符串模块(我认为应该是是python的一部分,而不是模块,但我离题了。)




的确,在最近的Pythons(2.0+,我认为)中,split()是

a字符串对象的方法:

''foo bar''。split()



[''foo'',''bar'']

同样适用于字符串模块中的许多其他功能。


(此方法是pydoc.org上split的第二个命中,并且是库参考中列出的

erence index。)


-

Steven Taschuk如果你弄错了,世界将会结束。
st ****** @ telusplanet.net - 排版数学 - 用户指南,

Brian Kernighan和Lorrinda Cherry


I''m looking for a good place for Python documentation. I''m really lost
on why it''s so hard to find anything when it comes to me looking up a
particular function in Python. My example would be the split() function
of the string module. Why can''t I just go to www.python.org and click
on Search and then type in split and it bring me to the split() function
of the string module? Why does it have to be so hard? This is what I
get when I search for split on www.python.org...

http://search.python.org/query.html?...s&col=starship

Most of those hits are for the re module, not the string module (which
in my opinion should be part of python and not a module, but I digress).
Why would it not bring up the split function of the string module
first and foremost?

If I do a search right now on www.perldoc.com for split, I get...

http://www.perldoc.com/cgi-bin/htsea...rict=perl5.8.0

Right there, the top hit is the slit function, how convenient.

If I go to www.php.net and type in split in the function list search, I
get...

http://www.php.net/manual/en/function.split.php

I don''t even get a hit list, it goes right to the split() function.
Even more convenient.

I''m trying to learn Python because we''re doing some work on the Zaurus
and there are so many supporting python modules for the Zaurus, that I''d
like to use it. I love learning new languages also. It just gives me a
bad taste in my mouth when I even think of searching for anything in Python.

Am I searching the wrong place? Am I choosing the wrong checkboxes on
the Search page? I''m at a loss. Is it really that hard to find
documentation on the python.org site?

Thanks for hearing my rant and I''m hoping I''m just doing something
wrong. I really can''t imagine such an organized programming language
having such a horrible search on their website.

解决方案

In article <LQ********************@comcast.com>,
"Daniel R. Smorey Jr." <sm***@ptdprolog.net> writes:

I''m looking for a good place for Python documentation. I''m really lost
on why it''s so hard to find anything when it comes to me looking up a
particular function in Python. My example would be the split() function
of the string module. Why can''t I just go to www.python.org and click
on Search and then type in split and it bring me to the split() function
of the string module?
Well, since you know which module the function is in, you can go to the
documentation page, look up string in the Global Module Index and find
split(). Only a few more clicks.

Or, even easier, you can fire up the interpreter, and do the following:

import string
help(string.split)



Or, on the commandline, type

pydoc string.split
Why does it have to be so hard? This is what I
get when I search for split on www.python.org...

http://search.python.org/query.html?...s&col=starship

Most of those hits are for the re module, not the string module (which
in my opinion should be part of python and not a module, but I digress).
Most of them are since 2.0. Check out string methods.

http://python.org/doc/current/lib/string-methods.html
Why would it not bring up the split function of the string module
first and foremost?



Because no one has asked for it to do so before? Because the unpaid
volunteers with limited time who run the site don''t need the feature
themselves and never realized that others might want it? Because the
string method and re function split() are equally good or better options
to return first?

Although I agree that there should be a checkbox option to search only
the current docs.

--
Robert Kern
ke**@caltech.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter


"Daniel R. Smorey Jr." <sm***@ptdprolog.net> wrote in message
news:LQ********************@comcast.com...

I''m looking for a good place for Python documentation. I''m really lost
on why it''s so hard to find anything when it comes to me looking up a
particular function in Python. My example would be the split() function



The help within python itsself is a good start.
For your example try

import string
help(string.split)

No need to visit a web site.


Quoth Daniel R. Smorey Jr.:

I''m looking for a good place for Python documentation. I''m really lost
on why it''s so hard to find anything when it comes to me looking up a
particular function in Python. My example would be the split() function
of the string module. [...trouble searching for it at python.org...]
For full-text searches, try <http://www.pydoc.org/>.

For functions and whatnot, there''s the index of the Library
Reference, <http://www.python.org/doc/2.3/lib/genindex.html>.

[...] Most of those hits are for the re module, not the string module (which
in my opinion should be part of python and not a module, but I digress).



Indeed, in sufficiently recent Pythons (2.0+, I think), split() is
a method of string objects:

''foo bar''.split()


[''foo'', ''bar'']
Likewise for many other functions in the string module.

(This method is the second hit for "split" at pydoc.org, and is
listed in the Library Reference index.)

--
Steven Taschuk "The world will end if you get this wrong."
st******@telusplanet.net -- "Typesetting Mathematics -- User''s Guide",
Brian Kernighan and Lorrinda Cherry


这篇关于Python文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆