[Python-Dev] Re: stringobject question

Finn Bock bckfnn@worldonline.dk
Thu, 15 Jun 2000 18:16:03 GMT


>On Wed, Jun 14, 2000 at 10:43:45AM +0200, M . -A . Lemburg wrote:
>> 
>> I guess it's a bug... a subtle one though, because in a
>> certain sense both 1 and 0 are acceptable. But since
>> '' is considered to be false, I think that returning 0
>> makes more sense.
>> 
>> I'll fix this to return 0 for emtpy strings and Unicode objects.

[Trent Mick]

>These are copied from Java, are they not? What do the Java equivalents
>return?

The .isXX methods does not exists on java strings, only on the Character
class. So in java they can never be called on anything with length 0.

regards,
finn