[New-bugs-announce] [issue41609] pdb's whatis command reports method as function

Irit Katriel report at bugs.python.org
Fri Aug 21 11:31:01 EDT 2020


New submission from Irit Katriel <iritkatriel at yahoo.com>:

pdb's whatis command prints 'Function' instead of 'Method' for a bound method:

> python.bat
Running Release|Win32 interpreter...
Python 3.10.0a0 (heads/master-dirty:12695f4c6d, Aug 21 2020, 15:48:06) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class MyClass:
...     def mymethod(self):
...         pass
...
>>> import pdb
>>> pdb.set_trace()
--Return--
> <stdin>(1)<module>()->None
(Pdb) whatis MyClass().mymethod
Function mymethod
(Pdb) MyClass().mymethod
<bound method MyClass.mymethod of <__main__.MyClass object at 0x0131D5C8>>
(Pdb)

----------
components: Library (Lib)
messages: 375756
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: pdb's whatis command reports method as function
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41609>
_______________________________________


More information about the New-bugs-announce mailing list