On 10/15/07, Dmitri O.Kondratiev <[EMAIL PROTECTED]> wrote: > To clarify my point: > reverse() is a lucky one - Python has variants of *this particular* > function both for lists and strings. Yet what about other list functions? > How in general, can I write a function that works both on list and string > types? Both are sequences, right? Why string is not a subtype of a list > then?
Lists are mutable, strings are not, so so strings can't support all a list's methods. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues -- http://mail.python.org/mailman/listinfo/python-list