Python Doc问题示例:os.path.split [英] Python Doc Problem Example: os.path.split

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

问题描述

Python Doc问题示例


引自: http://docs.python.org/lib/module-os.path.html

------- ---

拆分(路径)

将路径名路径拆分成一对,(头部,尾部),其中尾部是

最后一个路径名组件和头部是导致这一切的一切。

尾部将永远不会包含斜线;如果路径以斜线结尾,则尾部

将为空。如果路径中没有斜杠,则head将为空。如果

路径为空,则head和tail都为空。尾随斜杠是从头部剥离的
,除非它是根(仅限一个或多个斜杠)。在

几乎所有情况下,join(head,tail)等于path(唯一的例外是
,当有多个斜线将头部与尾部分开时)。

----------


谁能告诉我这个措辞是什么样的他妈的说什么?


什么他妈的是头和尾的东西?


是文档作家,试图写一些严谨的文档,但

对此感到困惑分裂的行为,还是混淆表达

呢?他的假装是否让他搞砸了?


我正在制作一个程序,我需要将路径拆分为dirname,

corename和后缀。但是这个他妈的蟒蛇博士转移了我的工作,并且浪费了我的时间。除了他妈的OpenSourcers和他妈的他妈的他妈的他妈的和他们他妈的懒散地宣传他们他妈的谎言之外,通常没有什么问题可以找到这个世界的不完美之处。


和愚蠢。死。


建议改写:


拆分(路径)

返回一对(dirname,filename),其中dirname是路径的一部分

到最后一个斜杠,而filename是

最后斜杠之后的其余字符串。


特殊情况是:

a?¢如果路径是单斜杠(或重复),则路径== dirname和

文件名为空。

a?¢如果a ?? lasta ??斜线重复,它们被处理为单个

斜线。


------------

他妈的混合OpenSourcing头衔。

(注意:我在这里使用OpenSource不包括GNU

社区的人。)


有关Python Doc问题的更多信息,请参阅
http: //xahlee.org/Periodic_dosage_di...ami_cukta.html


Xah
xa *@xahlee.org

a ?? http://xahlee.org/

Python Doc Problem Example

Quote from:
http://docs.python.org/lib/module-os.path.html
----------
split( path)
Split the pathname path into a pair, (head, tail) where tail is the
last pathname component and head is everything leading up to that. The
tail part will never contain a slash; if path ends in a slash, tail
will be empty. If there is no slash in path, head will be empty. If
path is empty, both head and tail are empty. Trailing slashes are
stripped from head unless it is the root (one or more slashes only). In
nearly all cases, join(head, tail) equals path (the only exception
being when there were multiple slashes separating head from tail).
----------

Can anyone tell me what this verbiage is trying to fucking say?

what the fuck is with the head and tail thing?

is the doc writer, trying to write the doc with some austereness, but
is confused about the behavior of split, or confused about expressing
it? Did his pretension fucked him up?

i was working on a program where i needed to split a path into dirname,
corename, and suffix. But this fucking python doc diverted my work and
wasted my time. It normally isn''t a problem to find imperfections in
the world except the fucking OpenSourcers fuck with their fucking
moronicity and moronitude and propagate haughtily their fucking lies
and stupidity. Die.

Suggested rewrite:

split(path)
returns a pair (dirname,filename), where dirname is the part of path
up to the last slash, and filename is the rest of the string after the
last slash.

Exceptional cases are:
a?¢ if path is a single slash (or repeated), then path == dirnameand
filename is empty.
a?¢ If the a??lasta?? slash is repeated, they are treatedas one single
slash.

------------
Fuck the motherfucking liers of OpenSourcing fuckheads.
(Note: my use of OpenSource here does not include people of GNU
community.)

For more about Python Doc problems, see
http://xahlee.org/Periodic_dosage_di...ami_cukta.html

Xah
xa*@xahlee.org
a?? http://xahlee.org/

推荐答案

On Sun,2005年9月18日03:46:03 -0700,Xah Lee唠叨:
On Sun, 18 Sep 2005 03:46:03 -0700, Xah Lee wibbled:
谁能告诉我这个措辞是什么试着他妈的说?
Can anyone tell me what this verbiage is trying to fucking say?




请不要喂巨魔。


换句话说,如果每个人都忽略这个失败者,他可能会回到他来自的岩石下面。


-

史蒂文。



Please don''t feed the trolls.

In other words, if everybody ignores this loser, he might crawl back under
the rock he came from.

--
Steven.


是文档编写者,试图用严谨的方式编写文档,但是对于拆分的行为感到困惑,或者困惑于表达
吗?他的假装是否让他搞砸了?
is the doc writer, trying to write the doc with some austereness, but
is confused about the behavior of split, or confused about expressing
it? Did his pretension fucked him up?



亲爱的Xah Lee,


Python社区非常抱歉因为我们有一个非常抱歉坏了

文档。你是对的。文档很糟糕,语言

是坏的等等。邮件列表本身没有帮助,你不能使用

的任何东西。我们将尝试遵循你所有的光荣建议。

但是我们有很多事情要做,我很害怕你需要等到

Python 5000发布了。在此之前,我可以向您推荐Visual

基本语言。它的文档更完美。 MSDN真的很好

非常结构化且易于使用!这是商业性的,而且 - 正如你所期望的那样...... b $ b预期 - 你会在做出这样的建议之后立即得到修复。

这样的建议。我认为这是你能做的最好的事情。


欲了解更多关于这个FabOLous ClosedSource商业广告

产品的信息,请访问此链接:

http://msdn.microsoft.com/vbasic/ < br $>
祝你好运!


Les


Dear Xah Lee,

The Python community is very sorry because we have a very bad
documentation. You are right. The documentation is bad, and the language
is bad etc. The mailing list itself is not helpful and you cannot use it
for anything. We will try to follow all of your glorious suggestions.
But we have so many things to do, I''m affraid you need to wait until
Python 5000 is released. Until that, I can recommend you the Visual
Basic language. Its documentation is much more perfect. MSDN is really
really well structured and easy to use! It is commercial, and - as you
would expect - you will get immediate fixes after you make a kind
suggestion like this. I think this is the best thing you can do.

For more information about this fabolous ClosedSource commercial
product, please visit this link:

http://msdn.microsoft.com/vbasic/

Good Luck!

Les


X-Ftn-致:Xah Lee


" Xah Lee" < xa*@xahlee.org>写道:
X-Ftn-To: Xah Lee

"Xah Lee" <xa*@xahlee.org> wrote:
Python Doc问题示例
Python Doc Problem Example




是什么让你确定这个问题对于
$ b $旁边的群体会很有趣b clpython?你乞求皈依真正的宗教吗? :-)

-

Matija



what makes you sure that this problem would be interesting for groups beside
c.l.python? are you begging to be converted to a true religion? :-)
--
Matija


这篇关于Python Doc问题示例:os.path.split的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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