restriction on sum: intentional bug?
Tim Chase
python.list at tim.thechases.com
Sat Oct 17 05:28:36 EDT 2009
Christian Heimes wrote:
> Alan G Isaac wrote:
>> On 10/16/2009 5:03 PM, Christian Heimes wrote:
>>> It's not going to happen.
>> That's a prediction, not a justification.
>
> It's not a prediction, it's a statement. It's not going to happend
> because it violates Guido's gut feeling as well as the Zen of Python.
I'm not sure how it violates ZoP...particularly
Simple is better than complex.
[complex is special casing or explaining why there's an error]
Special cases aren't special enough to break the rules.
[raising an error is a special case]
Although practicality beats purity.
In the face of ambiguity, refuse the temptation to guess.
[there's nothing ambiguous about sum() meaning "+"]
If the implementation is easy to explain, it may be a good idea.
[sum(lst_of_strs) should do exactly what it says..."+" 'em]
-tkc
More information about the Python-list
mailing list