Why tuple with one item is no tuple
Daniel Dittmar
daniel.dittmar at sap.corp
Fri Mar 18 06:53:08 EST 2005
Antoon Pardon wrote:
>>My peeve is about having operators added to standard types. This
>>increases the chances that using an object the wrong way leads to a
>>bogus result, not a runtime error. A more common programming error I
>>commit is passing a string where a list ist expected. And then I wonder
>>why later operations work on one-character strings.
>
>
> The standard answer to this seems to be to use unittesting.
>
I do detect that there is a problem. It just takes longer to find the
source of bogus data than to look at a stack trace.
Daniel
More information about the Python-list
mailing list