Tyler Crompton added the comment:

I agree about the documentation. It would only take a few minutes to do.

In regard to your inquiry about the second solution, more or less, yes. I left 
that one a bit ambiguous since there are many ways to skin that cat. But in 
retrospect, I probably shouldn't have included that potential solution since 
it'd be a bit goofy and wouldn't necessarily be much different (in terms of 
code conciseness) than the third workaround that I mentioned.

As for your suggestion about the fourth solution, I like that idea. I feel that 
it's actually more similar to the fifth solution than the fourth, but I feel 
that we're getting close to coming up with something that should be easy and 
effective.

Lastly, in regard to the fifth solution, yes. But I see what you're saying 
about the downside. Yeah, that would be rather annoying. For a moment, I 
thought that it could fall back to standard IO in the absence of 
Readline/libedit, but that would be a bit misleading for a function in the 
readline module. Besides, input already does that anyway.

I would imagine that in the vast majority of cases of using such a new 
function, the developer would fallback to input, because they'd likely 
prioritize getting the content from the user over ensuring Readline/libedit 
functionality. Since we already have a function that automatically does that, I 
think your suggestion to add a function to the readline module to 
enable/disable automatic history addition would be ideal. I'd be reluctant to 
use a global Python variable since it would be out of uniform with the rest of 
the members (i.e., functions) of the module.

I like the idea of adding a set_auto_history(flag=True|False) or something to 
that effect.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26870>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to