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 steven.daprano
Recipients SilentGhost, VertigoRay, paul.moore, steve.dower, steven.daprano, tim.golden, zach.ware
Date 2016-05-14.07:44:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463211879.81.0.478045408463.issue27017@psf.upfronthosting.co.za>
In-reply-to
Content
To explain in more detail: ``type('s').startswith`` is the same as ``str.startswith``, which is an unbound method in Python 2 and a regular function in Python 3. Either way, it expects *two* arguments: a string which becomes "self", and a second string argument, which is the prefix being tested for.

So type('any string').startswith('alphabet', 'al') is a long way of writing 'alphabet'.startswith('al').
History
Date User Action Args
2016-05-14 07:44:39steven.dapranosetrecipients: + steven.daprano, paul.moore, tim.golden, SilentGhost, zach.ware, steve.dower, VertigoRay
2016-05-14 07:44:39steven.dapranosetmessageid: <1463211879.81.0.478045408463.issue27017@psf.upfronthosting.co.za>
2016-05-14 07:44:39steven.dapranolinkissue27017 messages
2016-05-14 07:44:39steven.dapranocreate