[Python-checkins] r53860 - peps/trunk/pep-0000.txt peps/trunk/pep-0358.txt

Jim Jewett jimjjewett at gmail.com
Fri Feb 23 03:38:08 CET 2007


>          __setitem__
>          __setslice__
>          append
>          count
> +        decode
> +        endswith
>          extend
> +        find
>          index
>          insert
> +        join
> +        partition
>          remove
> +        replace
> +        rindex
> +        rpartition
> +        split
> +        startswith
> +        rfind
> +        rindex
> +        rsplit
> +        translate

What sort of arguments do they take?

Other bytes objects?  (Then the literal is more important.)

Unicode?  With an extra decoding argument?

Sequences of integers?  Is startswith(500) False or a ValueException?

Single integers? startswith(ord('A'))

+    Note the conspicuous absence of .isupper(), .upper(), and friends.

This does force the use of more regular expressions, by ruling out

data.upper().startswith("ERROR:")

-jJ


More information about the Python-checkins mailing list