[issue41266] Wrong hint when class methods and builtins named same

2020-07-11 Thread E. Paine


E. Paine  added the comment:

Both of the following cases give the correct popup help information:

float.hex(

And:

t = type("test_hex", (), {"hex": lambda nothing: None})
t.hex(

The reason your case fails is because IDLE doesn't evaluate `1.3` to a float 
and does indeed use the normal `hex` method help (as you established with your 
`list` test).

--
nosy: +epaine

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41266] Wrong hint when class methods and builtins named same

2020-07-10 Thread wyz23x2


New submission from wyz23x2 :

There is a function hex(number, /), and float objects have a method hex().
When something like 1.3.hex( is typed, the yellow box's first line contains 
hex(number, /). But the method is actually hex(), no arguments. It confuses 
users.
And when 1.3.list( is typed, there isn't a list() method in floats, but the 
hint still pops up and shows the __doc__ for list(iterable=(), /).

--
assignee: terry.reedy
components: IDLE
messages: 373455
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: Wrong hint when class methods and builtins named same
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com