Zope/DTML Infuriating...

Arnaud Delobelle arnodel at googlemail.com
Tue Apr 29 14:28:47 EDT 2008


Jens <jens at aggergren.dk> writes:
[...]
> @Marco: Thanks for the links :-) Python may be one of those really
> elegant languages, but the reference is really sub
> standard. Checkout the layout of php.net for comparison. Think what
> you will about php, but the reference is excellent. For that matter
> check out msdn section on old-school asp, or even the common-lisp
> documentation(http://www.lispworks.com/
> documentation/HyperSpec/Front/Contents.htm)

Beauty is in the eye of the beholder.  I'm used to the python doc
layout, and I can find my way round it pretty fast. What I like about
it is that it is organised thematically, so it is usually possible to
think your way to where the relevant documentation is.  Moreover,
Python has a very useful help functionality:

* at the interactive prompt:

>>> help(someobject)
>>> help(somemodule)

Will give you lots of useful information

* At the shell prompt:

$ pydoc <keyword>
--> documentation about keyword

> It's accessibility like that i'm missing. It shouldn't take 10 min
> and a usenet post to figure to how to basic stuff like string
> concatenation.

It takes time to learn a language, and that includes learning how the
documentation is organised.

> And theres still plenty of unanswered questions after checking the
> reference:
>
> - What is the exact definition of the operator e.g. op + (<string>,
> <string>) -> <string>, op + (<int>, <int>) : <int>, op + (<float> ...

The answers are here (in the library reference you checked):
http://docs.python.org/lib/types.html

> - What is the exact operator precedence

That's a language feature, so it's in the *language* reference.
http://docs.python.org/ref/summary.html

> - Why is it, when primitive data types seem to be objects (similar to
> javascript), that type casting is done through build-in functions
> rather than methods, e.g. String.toInt('5') or '5'.toInt() or x =
> Integer.fromString('5').

Because Python is not Javascript?

In fact some are methods, e.g. str(x) is shorthand for x.__str__().

-- 
Arnaud



More information about the Python-list mailing list