[Python-Dev] sys.setcheckinterval doc problems
Guido van Rossum
guido@python.org
Sun, 06 Jul 2003 14:34:49 -0400
> [Alex Martelli]
> > ...
> > As I was checking that, I was struck by the fact that
> > having "write-only" settings is quite an anomaly --
> > e.g. it makes writing a function that sets the check
> > interval to 0 temporarily, fiddles around a bit, then
> > sets it back to the previous value, a bit of trouble.
> >
> > Now that the check interval is a global variable, is
> > there any problem with making it readable (presumably
> > with a new sys.getcheckinterval() function) as well as
> > writable?
[Tim]
> Write-only settings are indeed strange. We could add a new function, or
> have setcheckinterval() return the old value.
I prefer get/set functions over the strange return-old-value API.
> The attached patch implements the former. Guido, do you object to adding
> this to 2.3? I don't (the potential for breakage seems insignificant).
Go for it.
--Guido van Rossum (home page: http://www.python.org/~guido/)