wrong auto-completion in python shell

Hello,
I came across a bug with the auto completion in functions in the python shell.
if we define a function with default values such as:

def add(firstValue=0,secondValue=1):
    return firstValue+secondValue

so we can use it with no defined inputs as: add() (it is a dummy example to reproduce the issue)

  1. if we go up (so come back to previous line to re do the call, but modifying something.) in my case i came across when doing this and wanting to call the function with same parameters but change a default flag. so we get add() but modifiable
  2. we go inside the () of the add, and type fir so, the line would look like this: add(fir|) the | is to indicate where the pointer of the wrinting is at that moment
  3. we hit tab to autocomplete to firstValue, (classic behavior of python) instead of getting add(firstValue) as one should get (and as one gets if it begings from a blank add() one gets add(firfirstValue

A. so there is a bug in the autocompletion.
B. i also notice that if we fill up the first input of the function, put a comma and try to auto fill the second input it does not auto fill. should i make a feature request for this?

edit: for the case of A. the bug comes directly from trying to use the auto fill not when going back to previous line, but simply if one wants to fill up a function that has already the parentesis closed. so if one defines the add function as i give in the example, and type add() put the cursor inside the () and writes fir and hit tab, it will become add(firfirstValue