DreiJane <joost <at> h-labahn.de> writes: > > Ohhh - that's nice. But no words of that in the library reference > here: > > http://docs.python.org/3.1/library/stdtypes.html#sequence-types-str-bytes-bytearray-list-tuple-range
That's because it's here: http://docs.python.org/3.1/library/stdtypes.html#bytes-and-byte-array-methods > > Still this fails: > > >>> a = (1,2,3,4) > >>> print(a.startswith((1,2))) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AttributeError: 'tuple' object has no attribute 'startswith' > > Still methods of this kind would have a better place in the sequence > protocol. You are welcome to bring this idea to the python-ideas list, just know that it has a small chance of being accepted. -- http://mail.python.org/mailman/listinfo/python-list