Python-by-example - new online guide to Python Standard Library

sjf sarah.fortune at gmail.com
Wed Apr 2 09:52:59 EDT 2008


Indeed, the first thing I saw on the front page was "math.sqrt(9) -
3.0". Ok, I thought, random arithmetic expression, so what?
There is already a standard way of showing a piece of code and its
results. It's the interactive prompt:

>>> import math
>>> math.sqrt(9)
3.0
>>>

Tada!


On Apr 2, 12:43 pm, GHUM <haraldarminma... at gmail.com> wrote:
> Tobu,
>
> I like this idea. Deducting from an example is really another way to
> wisdom.
>
> What struck me as most diffuclt to understand:
>
> abs(-5.5) - 5.5
>
> -> you are using "-" as symbol for "will give the result", which is
> really, really hard to parse. Take something else, please. Unicode has
> THAT many cool symbols. Or just -> or -=> or whatever.
>
> Thanks for sharing that work!
>
> Harald





More information about the Python-list mailing list