Ryan Pecor added the comment:
Wow, that was quick and the code looks clean too! Thanks for fixing that up!
--
___
Python tracker
<https://bugs.python.org/issue44
Ryan Pecor added the comment:
Actually, hasattr() specifically states that it uses getattr() so that behavior
is expected from getattr() so I will not be creating a separate issue for that.
Now that I see hasattr() uses getattr(), it looks like the tab completion issue
might not stem from
Ryan Pecor added the comment:
It looks to me like the issue is caused by the eval() in line 155 of the
rlcompleter.py file
(https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/rlcompleter.py#L155)
which runs the function in order to see if it runs or raises
Ryan Pecor added the comment:
I forgot to mention that I also added "~~~" to either side of the printed
string every time it printed to help differentiate the printed string from
commands that I typed into the interpreter.
--
___
Pyth
New submission from Ryan Pecor :
After making a class using the @property decorator to implement a getter, using
tab completion that matches the getter function name executes the function.
See below for example (line numbers added, indicates when the user
presses the tab key):
1