This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients brett.cannon, rhettinger, serhiy.storchaka, taleinat
Date 2018-08-03.05:12:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533273167.78.0.56676864532.issue34312@psf.upfronthosting.co.za>
In-reply-to
Content
> Teammate of mine tripped up against this because he tried to use a list.

Then, I recommend we close this.  Accepting a list would have encouraged inefficient code (a tuple of constants can be peephole optimized but a list of constants is rebuilt on every call).  Also, the error message is very clear, so it is unlikely he was "tripped-up" for more than a few seconds.

    >>> 'hello'.startswith(['he', 'go'])
    Traceback (most recent call last):
      File "<pyshell#1>", line 1, in <module>
        'hello'.startswith(['he', 'go'])
    TypeError: startswith first arg must be str or a tuple of str, not list
History
Date User Action Args
2018-08-03 05:12:47rhettingersetrecipients: + rhettinger, brett.cannon, taleinat, serhiy.storchaka
2018-08-03 05:12:47rhettingersetmessageid: <1533273167.78.0.56676864532.issue34312@psf.upfronthosting.co.za>
2018-08-03 05:12:47rhettingerlinkissue34312 messages
2018-08-03 05:12:47rhettingercreate