On Wed, 23 Aug 2006, John J Lee wrote:
[...]
>> An alternative would be to return None for not found.
>> It wouldn't solve the problem of people using the
>> return value as a boolean, but at least you'd get
>> an exception if you tried to use the not-found value
>> as an index.
>>
>> Or maybe it could return index values as a special
>> int subclass that always tests true even when it's
>> zero...
>
> How about returning a str.NotFound object?

Whoops, scratch that, doesn't solve anything more than returning None.


John
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to