By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,222 Members | 2,354 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,222 IT Pros & Developers. It's quick & easy.

Python documentation problem

P: n/a
Python documentation,
http://python.org/doc/2.4.1/lib/typesfunctions.html

-----------------
2.3.10.3 Functions

Function objects are created by function definitions. The only
operation on a function object is to call it: func(argument-list).

There are really two flavors of function objects: built-in functions
and user-defined functions. Both support the same operation (to call
the function), but the implementation is different, hence the different
object types.

See the Python Reference Manual for more information.
-----------------

Fuck the python doc wasted my time. Fuck python coders.
Each time i tried to use python doc and got frustrated because it being
grossly incompetent, i'll post a message like this, no more frequent
than once a week. This will go on as long the python community does
nothing to fix it or that i remain coding in python.
For reference, see
http://xahlee.org/perl-python/re-write_notes.html

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

Jul 19 '05 #1
Share this Question
Share on Google+
14 Replies


P: n/a
Xah Lee wrote:
Fuck the python doc wasted my time. Fuck python coders.


Use your words!

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
The mind is not a vessel to be filled but a fire to be kindled.
-- Plutarch
Jul 19 '05 #2

P: n/a
i wanted to find out if Python supports eval. e.g.

somecode='3+4'
print eval(somecode) # prints 7

in the 14 hundred pages of python doc, where am i supposed to find this
info?

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

Jul 19 '05 #3

P: n/a
Xah Lee said unto the world upon 18/06/2005 03:49:
Python documentation,
http://python.org/doc/2.4.1/lib/typesfunctions.html

-----------------
2.3.10.3 Functions

Function objects are created by function definitions. The only
operation on a function object is to call it: func(argument-list).

There are really two flavors of function objects: built-in functions
and user-defined functions. Both support the same operation (to call
the function), but the implementation is different, hence the different
object types.

See the Python Reference Manual for more information.
-----------------

Fuck the python doc wasted my time. Fuck python coders.
Each time i tried to use python doc and got frustrated because it being
grossly incompetent, i'll post a message like this, no more frequent
than once a week. This will go on as long the python community does
nothing to fix it or that i remain coding in python.
For reference, see
http://xahlee.org/perl-python/re-write_notes.html

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


I'm sure I will regret this in the morning . . . .

Xah, since the docs are a community effort, you surely can (and have)
pointed to genuine blemishes in them.

I am however at a loss to understand just what the perceived problem
is here. 5 short sentences, one defining a term, 1 stipulating the
interface, two pointing out and clearing up a potential cause of
confusion, and a reference. All are clear, and score quite well on the
content:words measure to boot. (Certainly it is clearer and more
informative than the words either you or I have here added.) What's
your complaint? Not enough cursing?

Best,

Brian vdB

Jul 19 '05 #4

P: n/a
Xah Lee said unto the world upon 18/06/2005 04:11:
i wanted to find out if Python supports eval. e.g.

somecode='3+4'
print eval(somecode) # prints 7

in the 14 hundred pages of python doc, where am i supposed to find this
info?

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


<http://www.python.org/doc/current/lib/built-in-funcs.html#l2h-23>
which I got to from
<http://starship.python.net/crew/theller/pyhelp.cgi?keyword=eval&version=current>
in less time that in took to type this.

Best,

Brian vdB

Jul 19 '05 #5

P: n/a
Xah Lee wrote:
i wanted to find out if Python supports eval. e.g.

somecode='3+4'
print eval(somecode) # prints 7

in the 14 hundred pages of python doc, where am i supposed to find this
info?


Option 1: As they say in the classics, "Suck it and see".
If you want to find out if something is supported, just type it in:
somecode = '3+4'
eval(somecode) 7
Option 2: Use help():
help(eval)

Help on built-in function eval in module __builtin__:

eval(...)
eval(source[, globals[, locals]]) -> value

Evaluate the source in the context of globals and locals.
The source may be a string representing a Python expression
or a code object as returned by compile().
The globals must be a dictionary and locals can be any mappping,
defaulting to the current globals and locals.
If only globals is given, locals defaults to it.

Option 3: If you have Windows, it's easy to find, just click on the
Python documentation icon, then select the index tab, and type in "eval"
(or whatever).

Option 4: On the Python website, click on the docs link, then choose
library reference manual, then either go to the built-in functions, or
go to the index and select "eval" -- this latter method will take you to
this link:

http://www.python.org/doc/2.4.1/lib/...cs.html#l2h-23

HTH,
John
Jul 19 '05 #6

P: n/a
Apparently i tried it before posting
eval '3'
and got misleading errors because i forgot the parenthesis...

This is a easy one to find in the doc...
The unhelpful doc organization and past experiences confounded this
case.

Thanks.

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

Jul 19 '05 #7

P: n/a
Also sprach Xah Lee:
i wanted to find out if Python supports eval. e.g.

somecode='3+4'
print eval(somecode) # prints 7

in the 14 hundred pages of python doc, where am i supposed to find this
info?


You are not going to find it in comp.lang.perl.misc.

Tassilo
--
use bigint;
$n=71423350343770280161397026330337371139054411854 220053437565440;
$m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($ m+=8)<=200);
Jul 19 '05 #8

P: n/a
> what is wrong with python doc
http://python.org/doc/2.4.1/lib/typesfunctions.html


the problem is that the page essentially says nothing. Nothing that is
relevant to programing, and such nothingness occupies a significant
portion of the python doc. (at least a quarter) It is like reading a
manual to operate a machinery, and in every other paragraph it offers
the (technically-fantastically-correct) explanations of what bolt or
material were used where.

the cause of such nothingness situation is because the brainlessness
approach to doc organization coupled with standard computer industry
geeking moron's need to computer-sciency speak with implementation
infatuation. And in part it came to that really because they are
comparative morons.

for a more sincere, detailed account, please see:
http://xahlee.org/perl-python/re-write_notes.html

Thanks.

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

Jul 19 '05 #9

P: n/a
On Sat, 18 Jun 2005 11:49:38 +0200, Xah Lee wrote
(in article <11**********************@g44g2000cwa.googlegroups .com>):
the problem is that the page essentially says nothing. Nothing that is
relevant to programing, and such nothingness occupies a significant
portion of the python doc. (at least a quarter) It is like reading a
manual to operate a machinery, and in every other paragraph it offers
the (technically-fantastically-correct) explanations of what bolt or
material were used where.


I'm new to Python and the information that's in the docs (at least that
example) was what I was looking for. I read this as the referece manual, not
a cookbook or a tutorial which clearly requires another style of
documentation.

Jul 19 '05 #10

P: n/a
On Sat, 18 Jun 2005 12:02:07 +0200, Kalle Anke wrote:
On Sat, 18 Jun 2005 11:49:38 +0200, Xah Lee wrote
(in article <11**********************@g44g2000cwa.googlegroups .com>):
the problem is that the page essentially says nothing. Nothing that is
relevant to programing, and such nothingness occupies a significant
portion of the python doc. (at least a quarter) It is like reading a
manual to operate a machinery, and in every other paragraph it offers
the (technically-fantastically-correct) explanations of what bolt or
material were used where.


I'm new to Python and the information that's in the docs (at least that
example) was what I was looking for. I read this as the referece manual, not
a cookbook or a tutorial which clearly requires another style of
documentation.


At the risk of making an ad hominem attack, Xah Lee's posts usually have
all the characteristics of Internet trolling. He unnecessarily cross-posts
to multiple newsgroups. He makes sweeping generalizations and inflammatory
criticisms based on little understanding. He frequently uses abusive
language. He tries to critique Python as an expert, and yet frequently
makes silly newbie mistakes or displays ignorance of some very basic
Python features.

http://en.wikipedia.org/wiki/Internet_troll
http://www.teamtechnology.co.uk/troll.htm
--
Steven.
Jul 19 '05 #11

P: n/a
On 2005-06-18, Xah Lee <xa*@xahlee.org> wrote:

[...]
Fuck the python doc wasted my time. Fuck python coders. Each
time i tried to use python doc and got frustrated because it
being grossly incompetent, i'll post a message like this, no
more frequent than once a week. This will go on as long the
python community does nothing to fix it or that i remain
coding in python.


I guess it's kind of him to warn everybody who hasn't already
plonked him...

--
Grant Edwards grante Yow! I'm wet! I'm wild!
at
visi.com
Jul 19 '05 #12

P: n/a
Xah Lee wrote:
Python documentation,
[...] Python Reference Manual for more information.
[...] python doc wasted my time. [...] python coders.
[...] use python doc
python community [...] coding in python.


[Sexual explicatives deleted]

And this outburst has exactly _what_ to do with Perl (see list of NGs)?

jue
Jul 19 '05 #13

P: n/a
Xah Lee wrote:
i wanted to find out if Python supports eval. e.g.

somecode='3+4'
print eval(somecode) # prints 7

in the 14 hundred pages of python doc, where am i supposed to find
this info?


Why are you asking in a Perl NG for information about Python?
Or are you also asking your backer how to trim a steak?

jue
Jul 19 '05 #14

P: n/a
In comp.lang.perl.misc Xah Lee <xa*@xahlee.org> wrote:
i wanted to find out if Python supports eval. e.g. somecode='3+4'
print eval(somecode) # prints 7 in the 14 hundred pages of python doc, where am i supposed to find this
info?


By using the index - it's an alphabetical list of names and topics.

Follow-ups set.

Axel
Jul 19 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.