At Tuesday 3/10/2006 21:52, Ben Finney wrote:

Gerrit Holl <[EMAIL PROTECTED]> writes:

> operations that aren't currently defined in PEP 358, like:
>
>     - str methods endswith, find, partition, replace, split(lines),
>       startswith,
>     - Regular expressions
>
> I think those can be useful on a bytes type. Perhaps bytes and str
> could share a common parent class? They certainly share a lot of
> properties and possible operations one might want to perform.

Looking at those, I don't see why they wouldn't be useful for *all*
sequence types. Perhaps there needs to be a 'seq' type containing
those common methods, that is the superclass of 'str', 'bytes',
'list', 'tuple' et cetera.

find() could be useful sometimes.
But what means partition, replace, split, etc on a generic sequence?



Gabriel Genellina
Softlab SRL

        
        
                
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! http://www.yahoo.com.ar/respuestas

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to