"AK" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

|| I'll be glad to hear comments/suggestions/etc:
|
| http://www.lightbird.net/py-by-example/

Using - as the example/return delimiter does not work.
If you do not want to substantially lengthen the document by going to

>>> sqrt(9)
3

then use Python's a comment symbol.

sqrt(9) # 3
-or-
sqrt(9) # returns 3 (but I think I prefer the first)

which clearly is not an arithmetic expression and which can be 
cut-and-pasted into the interactive interpreter.  This also works nicely 
for invalid examples.

sqrt(-9) # raises ValueError

Terry Jan Reedy







-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to