Python documentation problem

X

Xah Lee

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.
-----------------

**** the python doc wasted my time. **** 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
(e-mail address removed)
∑ http://xahlee.org/
 
X

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?

Xah
(e-mail address removed)
∑ http://xahlee.org/
 
B

Brian van den Broek

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.
-----------------

**** the python doc wasted my time. **** 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
(e-mail address removed)
∑ 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
 
B

Brian van den Broek

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
(e-mail address removed)
∑ 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
 
J

John Machin

Xah said:
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:

Option 2: Use help():
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/built-in-funcs.html#l2h-23

HTH,
John
 
X

Xah Lee

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
(e-mail address removed)
∑ http://xahlee.org/
 
T

Tassilo v. Parseval

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
 
X

Xah Lee

what is wrong with python doc

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
(e-mail address removed)
∑ http://xahlee.org/
 
K

Kalle Anke

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.
 
S

Steven D'Aprano

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
 
G

Grant Edwards

[...]
**** the python doc wasted my time. **** 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...
 
J

Jürgen Exner

Xah said:
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
 
J

Jürgen Exner

Xah said:
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
 

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,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top