[perl-python] Python documentation moronicities (continued)

X

Xah Lee

http://python.org/doc/2.4.1/lib/module-re.html
http://python.org/doc/2.4.1/lib/node114.html

---------
QUOTE
The module defines several functions, constants, and an exception. Some
of the functions are simplified versions of the full featured methods
for compiled regular expressions. Most non-trivial applications always
use the compiled form
UNQUOTE


What does a programer who wants to use regex gets out from this piece
of motherfucking irrevalent drivel?

----------
QUOTE
compile(
pattern[, flags])

Compile a regular expression pattern into a regular expression object,
which can be used for matching using its match() and search() methods,
described below.

The expression's behaviour can be modified by specifying a flags
value. Values can be any of the following variables, combined using
bitwise OR (the | operator).
UNQUOTE


What exactly is it fucking saying?

I wanted to use regex to find & replace on text. I've read in a file.
Trying to reading this fucking doc is a pain in the ass. What are these
"flags"? Do i do

re.compile(r'mypat','M') or
re.compile(r'mypat',M)
or perhaps
re.compile(r'mypat',re.M)

The M isn't a fucking variable. Why does the doc incompetently use that
term?
And what the **** is it unclearly meant by "OR" operator with the
mother fucking bitwise jargon?

All a person reading regex really wanted is to see how to use a string
pattern and replace it with another. The fucking doc cannot be possibly
fucking worsely written.

**** the mother fucking coders in the IT industry.

So, is
re.compile(r'mypat','M')
re.compile(r'mypat','MULTILINE')
equivalent?

and, by that fucking bitwise shit is it meant to say like
re.compile(r'mypat','M'|'U')
?

why cannot this piece of shit writing give a single example of usage?
and motherfucking confusedly organized, with fucking variable terms the
writer don't fucking understand, and meanwhile always trying to sound
big asshole and don't stop at masturbation by mention a regex book and
not hesitate to mention another language Perl. Fucking morons.

for a exposition of IT's fucking stupid docs and their fuckhead coders,
see:
http://xahlee.org/Periodic_dosage_dir/t2/xlali_skami_cukta.html

a cleaned up account of this post will be appended to the above
exposition.

--------

One final piece of advice here to sober up the fuckheads who are
currently offended and defiant: you want to ask yourself this question:
Can a seasoned programer, who is expert at least 2 languages, who is
also a expert at Perl and knew regex well, and who has also read the
official Python tutorial and has written at least 10 simple python
programs over a span of a month, can such a person, who have not yet
used regex in Python but now wants to use regex in Python and have just
read the doc, must he, resort to many trial and error to see exactly
what the doc is talking about?

But, can this doc be (re-)written effectively and easily so that any
programers needn't do trial'n'error post-reading?

The answer to the questions are resounding yeses, you fucking asses.

paypal me a hundred dollars and i'll rewrite the whole re doc in a few
hours.

**** you the standard IT morons. Excuse me for i didn't have time to
write a more coherent and detailed analysis of the stupidities of the
re doc.

Xah
(e-mail address removed)
∑ http://xahlee.org/PageTwo_dir/more.html ☄
 
R

Roman Neuhauser

# (e-mail address removed) / 2005-04-12 03:25:33 -0700:
QUOTE
compile(
pattern[, flags])

Compile a regular expression pattern into a regular expression object,
which can be used for matching using its match() and search() methods,
described below.

The expression's behaviour can be modified by specifying a flags
value. Values can be any of the following variables, combined using
bitwise OR (the | operator).
UNQUOTE
And what the **** is it unclearly meant by "OR" operator with the
mother fucking bitwise jargon?

"bitwise OR (the | operator)": it doesn't speak about an "OR
operator", does it?
for a exposition of IT's fucking stupid docs and their fuckhead coders,
see:
http://xahlee.org/Periodic_dosage_dir/t2/xlali_skami_cukta.html

Interesting reading, I might send you a few of my pet peeves for
inclusion.
you want to ask yourself this question:
Can a seasoned programer, who is expert at least 2 languages, who is
also a expert at Perl and knew regex well, and have just read the doc,
must he, resort to many trial and error to see exactly what the doc is
talking about?

While I understand your frustration (I curse the same when I try to
use the Python documentation), you are spoiling your message by
the (IMNSHO well granted, but still) unhelpful profanity.

Unfortunately, the python community seems to bathe in the
misorganized half-documentation, see e. g.
http://marc.theaimsgroup.com/?l=python-list&m=111303919606261&w=2
especially the reply that (as I read it) suggested reverse
engineering as a viable alternative to documentation.
 
R

Richie Hindle

[Xah]
motherfucking ... fucking ... fucking ... fucking ... **** ... fucking
fucking ... fucking ... mother fucking ... fucking ... piece of shit ...
motherfucking ... fucking ... fucking ... big asshole ... masturbation ...
Fucking morons ... fucking stupid ... fuckhead coders ... fuckheads ...
you fucking asses.
paypal me a hundred dollars and i'll rewrite the whole re doc in a few
hours.

Can we paypal you a hundred dollars to leave us alone? I'll pledge $10.
Are there another nine people here who'll do the same?
 
D

Diez B. Roggisch

Can we paypal you a hundred dollars to leave us alone? I'll pledge $10.
Are there another nine people here who'll do the same?

Me, me. I'm good for ten, too. The current euro-dollar exchange course makes
that the price of a normal size McDonalds Menu - so sparing that makes me
healthier both mentally and physically. Great deal.
 
P

Pokerface

Gotta say, is we let this man write the docs for us, they'll sure a
sugar be more colorful than the ones we presently have, even if h
doesn't manage to make them better.

"The [insert relation]****ing Python interpreter is usually installe
as /usr/local/bin/python on those g*dd*mn machines where it i
available; putting /usr/local/bin in your ****ing Unix shell's searc
path makes it possible to start it by typing the command python to th
shell. F***er.
 
R

rbt

Xah said:
What does a programer who wants to use regex gets out from this piece
of motherf**king irrevalent drivel?

Any resume that ever crosses my desk that includes 'Xah Lee' anywhere in
the name will be automatically trashed.
 
I

Ivan Van Laningham

Hi All--

Richie said:
[Xah]
motherfucking ... fucking ... fucking ... fucking ... **** ... fucking
fucking ... fucking ... mother fucking ... fucking ... piece of shit ...
motherfucking ... fucking ... fucking ... big asshole ... masturbation ...
Fucking morons ... fucking stupid ... fuckhead coders ... fuckheads ...
you fucking asses.
paypal me a hundred dollars and i'll rewrite the whole re doc in a few
hours.

Can we paypal you a hundred dollars to leave us alone? I'll pledge $10.
Are there another nine people here who'll do the same?

Why don't we pay him $100 to re-write the PERL docs?

Metta,
Ivan
----------------------------------------------
Ivan Van Laningham
God N Locomotive Works
http://www.andi-holmes.com/
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps: Cu Chi, Class of '70
Author: Teach Yourself Python in 24 Hours
 
R

Richard Gration

I am greatly amused.
A troll impersonating Xah Lee has made xah look like a total moron. LOL

"The fucking doc cannot be possibly fucking worsely written."

This is very Xahish though, even if it's not him.

It's right up there with "AND, the writting as usuall is fantastic
incompetent."
 
P

Peter Hansen

Joe said:
I am greatly amused.
A troll impersonating Xah Lee has made xah look like a total moron.
LOL

Sorry, Joe, but why do you think this wasn't Xah?
Every detail of the post is consistent with his
recent postings.

And a secondary, but purely rhetorical, question:
how could the post have made him look like a moron
when he already looked like one?
 
G

Gerrit Holl

Ivan said:
Richie said:
[Xah]
motherfucking ... fucking ... fucking ... fucking ... **** ... fucking
fucking ... fucking ... mother fucking ... fucking ... piece of shit ...
motherfucking ... fucking ... fucking ... big asshole ... masturbation ...
Fucking morons ... fucking stupid ... fuckhead coders ... fuckheads ...
you fucking asses.
paypal me a hundred dollars and i'll rewrite the whole re doc in a few
hours.

Can we paypal you a hundred dollars to leave us alone? I'll pledge $10.
Are there another nine people here who'll do the same?

Why don't we pay him $100 to re-write the PERL docs?

Interestingly, Richard Hindle's message was classified as ham by my
spambayes, whereas your message was unsure. Could it be the
second-to-last word doing it? (-;

Gerrit.

--
Weather in Twenthe, Netherlands 12/04 19:55:
13.0°C wind 2.2 m/s NNW (57 m above NAP)
--
In the councils of government, we must guard against the acquisition of
unwarranted influence, whether sought or unsought, by the
military-industrial complex. The potential for the disastrous rise of
misplaced power exists and will persist.
-Dwight David Eisenhower, January 17, 1961
 
R

runes

why cannot this piece of shit writing give a single example of usage?


Actually, I can understand your frustration even if you should enhance
your vocabulary slightly. I often struggle with the Python
documnetation myself and I can't understand why a couple of examples
are so hard to give. When I laernt PHP I used the resources at php.net
exclusively, and that's because of the plenty of examples and the
newbie friendlyness. Recently I struggled with the regex module and
found the the documentation being close to worthless. I'm not a CS guy,
I may have a harder fight grasping concepts. The re documentation, like
much Python documentation seems to be written with other people than my
kind in mind. Luckily I found this regex howto:
http://www.amk.ca/python/howto/regex/ and that helped a lot. In
addition, Mr. Magnus Lie Hetland coincidentally posted a question on
this list that got answers that helped me out.
(http://groups-beta.google.com/group...6ca66231d7f?q=Hetland&rnum=2#fc4c56ca66231d7f)
 
J

John Machin

Unfortunately, the python community seems to bathe in the
misorganized half-documentation, see e. g.
http://marc.theaimsgroup.com/?l=python-list&m=111303919606261&w=2
especially the reply that (as I read it) suggested reverse
engineering as a viable alternative to documentation.


As I read the reply, it was a smart-arse attempt at humour, a *PUN* on
the word "list" (mailing list versus Python list). What I would call
"introspection" (not "reverse engineering") was then suggested.

Moreover, both of the concepts mentioned in the quoted thread
(sequence.index() and the "in" operator) are IMESHO adequately
documented.

Do you have any examples of what you regard as "misorganized
half-documentation"?

Here's a puzzle for you: Where does this list appear? What's missing?

"..., Mullender, Nagata, Ng, Oner, Oppelstrup, ..."
 
J

John Machin

Luckily I found this regex howto:
http://www.amk.ca/python/howto/regex/ and that helped a lot.

Luckily??? AMK's howto is pointed to by the 3rd paragraph of Section
4.2.1 of the documentation that you are dissing:

"""
A brief explanation of the format of regular expressions follows. For
further information and a gentler presentation, consult the Regular
Expression HOWTO, accessible from http://www.python.org/doc/howto/.
"""
In
addition, Mr. Magnus Lie Hetland coincidentally posted a question on
this list that got answers that helped me out.
(http://groups-beta.google.com/group...6ca66231d7f?q=Hetland&rnum=2#fc4c56ca66231d7f)

The answers (paraphrased) were "read the [Xah-Lee-word]ing manual".
I'm glad that you RTFMed, and that it helped you. You should do so
more often.
 
R

runes

Thank you for being so friendly!

I found the Howto through Google. Somehow I didn't see that link in the
documentation.

And please do not make any assumptions about my reading of manuals.
 
A

axel

In comp.lang.perl.misc Xah Lee said:
The answer to the questions are resounding yeses, you fucking asses.
paypal me a hundred dollars and i'll rewrite the whole re doc in a few
hours.
**** you the standard IT morons. Excuse me for i didn't have time to
write a more coherent and detailed analysis of the stupidities of the
re doc.

Don't worry! Very soon, some nice men in white coats will show you
a comfortable room with soft walls in which you can write such
documentation to your hearts content.

Axel
 
P

peufeu

I sympathize with you and also think there should be an "add comment" in
the Python documentation website, so that users could post their code
snippets in the relevant places.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top