[Python-Dev] Patch review: all webbrowser.py related patches up
to 2005-03-20
Greg Ward
gward at python.net
Tue Mar 22 03:39:38 CET 2005
On 20 March 2005, rodsenra at gpr.com.br said:
> 1166780 Fix _tryorder in webbrowser.py
> -----------------------------------------------------------
>
> This is my own patch.
>
> At the present time (Py2.4) documentation says:
> """
> Under Unix, if the environment variable BROWSER exists,
> it is interpreted to override the platform default list of
> browsers,...
> """
> (extract from Python-2.4/Doc/html/lib/module-webbrowser.html)
>
> But, when the environment variable BROWSER is messed up,
> there is no reason not to try the other detected browser alternatives.
I like it. Short, simple, and obvious. Can you think of a way to
unit-test it? I took a brief look at the code, and it wasn't obvious to
me. Might require factoring out a lazy initializer, and even then it
might not work. And that would certainly call for more unit tests!
Still, it's worth a shot.
Greg
--
Greg Ward <gward at python.net> http://www.gerg.ca/
Predestination was doomed from the start.
More information about the Python-Dev
mailing list