[Python-Dev] readline.clear_history()

Barry Warsaw barry at python.org
Wed Aug 27 23:18:50 EDT 2003


On Wed, 2003-08-27 at 17:56, Phillip J. Eby wrote:

> * Should clear_history() only appear in the readline module if the facility 
> exists?

Yes.

> * If it should always appear, should it be a no-op if the facility isn't 
> available, or raise an error?
> 
> "Errors should never pass silently" suggests that if it does appear, it 
> should raise an error if the facility doesn't exist.  So, I guess the 
> question is, should you get an error trying to access clear_history(), or 
> an error calling it?  (And in the latter case, is NotImplementedError the 
> right thing to raise?)

Error when accessing it.

> Last question (I hope): as a feature, I presume this has to wait for 2.4 to 
> get in, yes?

Hmm, it won't break backward compatibility, so maybe 2.3.1 would be
okay.  OTOH, it ain't a bug fix.  OTOOH, 2.4 is a loonnngg way away.

-Barry





More information about the Python-Dev mailing list