function that accepts any amount of arguments?

malkarouri malkarouri at gmail.com
Thu Apr 24 08:28:12 EDT 2008


On Apr 24, 12:43 pm, Bruno Desthuilliers <bruno.
42.desthuilli... at websiteburo.invalid> wrote:
[...]
> Not quite sure what's the best thing to do in the second case - raise a
> ValueError if args is empty, or silently return 0.0 - but I'd tend to
> choose the first solution (Python's Zen, verses 9-11).

What's wrong with raising ZeroDivisionError (not stopping the
exception in the first place)?

k



More information about the Python-list mailing list