[issue27017] Python3.5.1: type().startswith()

2016-05-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: 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

[issue27017] Python3.5.1: type().startswith()

2016-05-14 Thread SilentGhost
Changes by SilentGhost : -- status: open -> closed ___ Python tracker ___ ___

[issue27017] Python3.5.1: type().startswith()

2016-05-14 Thread SilentGhost
SilentGhost added the comment: This is exactly how methods on Python object have been behaving for year: any method can be called either as method on instance, or as method on class, with instance passed as the first argument. -- nosy: +SilentGhost resolution: -> not a bug stage: ->

[issue27017] Python3.5.1: type().startswith()

2016-05-14 Thread Ray
New submission from Ray: This doesn't look like proper functionality Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> type('') >>>