Python complaints

Patrick Tufts zippy at
Wed Nov 24 07:40:21 CET 1999

In article <221119992150405215%zippy at>, Patrick Tufts
<zippy at> wrote:

> Here's an example:
> (defun foo (x) (mod x 4))    ; return x mod 4, always an integer
> (defun bar (x) (^ 2 x))      ; return 2^x, always an integer
> (defun baz (a b) (+ (foo a) (bar b)))  ; foo(a) + bar(b)

A reader has pointed out that this is a bogus example, because foo and
bar are not guaranteed to return ints (among other things).

I could give an example like 

(defun foo (x) 4)
(defun bar (x) 3)
(defun baz (a b) (+ (foo a) (bar b)))

but that's so simple that it's not very interesting, and my mind is too
fuzzy now to come up with an interesting example.

If anyone else is up to the challenge of correctly saying what I should
have, please do.


More information about the Python-list mailing list