<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>RE: [Python-Dev] Rationale for sum()'s design?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>[Guido van Rossum]</FONT>
</P>

<P><FONT SIZE=2>#- &gt; 1. When omitting the second argument, would supplying an </FONT>
<BR><FONT SIZE=2>#- empty list return 0,</FONT>
<BR><FONT SIZE=2>#- &gt; None or raise an exception?</FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- Good question...</FONT>
</P>

<P><FONT SIZE=2>I'd go for None:</FONT>
</P>

<P><FONT SIZE=2>- Is a good default for a non-existing argument.</FONT>
</P>

<P><FONT SIZE=2>- If won't get None from sum() in other case (unless you do sum(None), but you should be aware of that).</FONT>
</P>
<BR>

<P><FONT SIZE=2>.&nbsp;&nbsp;&nbsp; Facundo</FONT>
</P>

<P><FONT SIZE=2>Bitácora De Vuelo: <A HREF="http://www.taniquetil.com.ar/plog" TARGET="_blank">http://www.taniquetil.com.ar/plog</A></FONT>
<BR><FONT SIZE=2>PyAr - Python Argentina: <A HREF="http://pyar.decode.com.ar/" TARGET="_blank">http://pyar.decode.com.ar/</A></FONT>
</P>

</BODY>
</HTML>