473,729 Members | 2,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Doc Problem Example: os.path.split

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,filena me), 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:
• if path is a single slash (or repeated), then path == dirnameand
filename is empty.
• If the “last” 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
http://xahlee.org/

Sep 18 '05 #1
12 4036
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.

Sep 18 '05 #2
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?

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

Sep 18 '05 #3
X-Ftn-To: Xah Lee

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


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
Sep 18 '05 #4
Laszlo Zsolt Nagy a crit :
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?

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

KEYBOARD !
Sep 18 '05 #5
> Please don't feed the trolls.
In other words, if everybody ignores this loser, he might crawl back under
the rock he came from.


Well, comp.lang.pytho n people would do better to accept the suggested
rewrite and ignore at the rest at their discretion.

Sep 18 '05 #6
Another epileptic seizure on the keyboard. Apart from clue deficit
disorder, this guy seems to suffer from some serious anger management
problems...*plo nk*
"Xah Lee" <xa*@xahlee.org > wrote:
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,filena me), 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:
if path is a single slash (or repeated), then path == dirname and
filename is empty.
If the "last" slash is repeated, they are treated as 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
? http://xahlee.org/


Sep 18 '05 #7
Addendum:

I was working on a program where i needed to split a path into dirname,
corename, and suffix.

I came to this page and took me a while to understand what split() is
about. There are other path related functions splitext(), splitdrive(),
basename(), dirname(). User has to scan the whole page and read
painfully each one to fully understand how to choose and use them for
the task at hand.

As i have explained before (see references at bottom), documentation
should be organized oriented towards programer's tasks, not
alphabetically, compiler view, or computer sciency scheme. On this
os.path module, split(), splittext(), dirname(), basename() should all
be under one section. This way, their usefulness and each's fitness
becomes clearer, and also easier to document as a collective. Other
functions that test files or get info about files should be together.
Don't be afraid that there are functions that doesn't fit into some
“classificati on”. For exapmle, the walk() and
supports_unicod e_filenames() can be lumped at the bottom as Other. The
need to present materials in some aloof, computer sciency, academic,
precision pretensions way is a major usability problem in the Python
doc.

(the OpenSourcers's need to present materials that way is a backlash of
the willful juvenile sloppiness of unix/perl community. However, they
being the same crowd without significant critical thinking and writing
skills, cannot do better by hiding in formality.)

Also, at the top we see:

Warning: On Windows, many of these functions do not properly
support UNC pathnames. splitunc() and ismount() do handle them
correctly.

As indicated before, this is a exhibition of tech geeking and
jargonizing. If this warning is necessary, place it at the bottom of
the page as a footnote. Also, spell out UNC, and provide a link to its
proper spec.

Tech geekers are very pretentious of tech matters. They are afraid, as
if spelling out UNC would make them unprofessional, that their peers
would deem them inferior. There are a myriad of techincal standards
that any programer could only be familiar with a fraction, confined to
his area of expertise. Standards and its acronyms come and go , and
each with varying degree of precision, actual revelance, and they are
intermingled with de facto “standards” in the commercial world that
may not even have official names. The tech geekers are clouded by their
narrow knowledge. The purpose of documentation is not some cold
academic presentation. Vast majority who came to use os.path wouldn't
know what UNC is. Spell things out when in doubt.

UNC here, isn't really a significant “standard”. This warning
should be left out.

-----------
This post is archived at:
http://xahlee.org/perl-python/python...ath_split.html

Xah
xa*@xahlee.org
http://xahlee.org/
Xah Lee wrote:
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,filena me), 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:
• if path is a single slash (or repeated), then path == dirname and
filename is empty.
• If the “last” slash is repeated, they are treated as 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
http://xahlee.org/


Sep 19 '05 #8
>
split(path)
returns a pair (dirname,filena me), where dirname is the part of path
up to the last slash, and filename is the rest of the string after the
last slash.


Bullshit. Slash isn't always the path component delimiter. Get a clue on
what you're talking about before suggesting so-called "improvemen ts".
And once and for all get it into your head that it's not the purpose of
this nor any other documentation effort to precisely fit your
nano-tube-narrow mindset.

Diez
Sep 19 '05 #9
Op 2005-09-19, Diez B. Roggisch schreef <de***@nospam.w eb.de>:

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


Bullshit. Slash isn't always the path component delimiter. Get a clue on
what you're talking about before suggesting so-called "improvemen ts".
And once and for all get it into your head that it's not the purpose of
this nor any other documentation effort to precisely fit your
nano-tube-narrow mindset.


I think this is unfair. The use of "slash" is a failing of the current
documentation. If his use is an indication of a nano-tube-narrow
mindset then so would be the use by the actual documentation writers.

--
Antoon Pardon
Sep 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5324
by: Shalen chhabra | last post by:
Hey, Can anyone give me a snippet for running a python program over all the files in the directory. For ex: I have ten files in a directory and I want to run a python program against all of these files, I wish to do the same using another python code instead of running each of these files one by one, which would be cumbersome giving the argv of each file every single time. This can be easily done using a shell script but I just...
68
5874
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
3
12375
by: Xah Lee | last post by:
Split File Fullpath Into Parts Xah Lee, 20051016 Often, we are given a file fullpath and we need to split it into the directory name and file name. The file name is often split into a core part and a extension part. For example: '/Users/t/web/perl-python/I_Love_You.html' becomes
0
2265
by: Xah Lee | last post by:
One-Liner Loop in Functional Style Xah Lee, 200510 Today we show a example of a loop done as a one-liner of Functional Programing style. Suppose you have a list of file full paths of images: /Users/t/t4/oh/DSCN2059m-s.jpg
5
6775
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would cause. If I could create a large file that could be encrypted, and maybe add files to it by appending them and putting in some kind of delimiter between files, maybe a homemade version of truecrypt could be constructed. Any idea what it...
6
1915
by: Lex Hider | last post by:
Hi, Apologies if this is against etiquette. I've just got my first python app up and running. It is a podcast aggregator depending on feedparser. I've really only learnt enough to get this up and running. Any tips on the code quality and use of python would be appreciated. I've got a feeling the overall structure is up the creek. approx 220 LOC. file: GodCast.py
0
1682
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 420 open ( +4) / 3410 closed ( +2) / 3830 total ( +6) Bugs : 915 open (+17) / 6186 closed ( +6) / 7101 total (+23) RFE : 235 open ( +1) / 238 closed ( +0) / 473 total ( +1) New / Reopened Patches ______________________
1
2441
by: William Connery | last post by:
Hi, I have a small python program with e-mail capabilities that I have pieced together from code snippets found on the internet. The program uses the smtplib module to successfully send an e-mail with an attachment. I want to give users an indication of the percentage of the e-mail that has already been sent so as to avoid frustration when dealing with large attachments or a slow smtp server. But the smtplib module doesn't seem to...
0
1983
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 385 open (+21) / 3790 closed (+21) / 4175 total (+42) Bugs : 1029 open (+43) / 6744 closed (+43) / 7773 total (+86) RFE : 262 open ( +4) / 291 closed ( +4) / 553 total ( +8) New / Reopened Patches ______________________
0
8917
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.