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

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.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to