[Python-Dev] -Dwarn, long->double overflow (was RE: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.219,1.220)

Greg Stein gstein@lyra.org
Sun, 2 Sep 2001 10:22:54 -0700


On Sat, Sep 01, 2001 at 10:10:10PM -0400, Guido van Rossum wrote:
>...
> Would it make sense to define a Jython property for the division
> behavior?  Then I could change the syntax to -Ddivision=old,
> -Ddivision=warn, -Ddivision=new.  That's a bit long, but acceptable.

This would be similar to compilers which use -Dsym[=value]. Apache has a
similar -Dsym[=value] option.

Note that a general -Dkey=value option would be quite nice. They could all
end in sys.startoptions or somesuch. After the -D switches are processed,
the startup code can look in the dictionary for "division" to determine what
to do.

sys.startoptions would be a generalized way to pass parameters into
subsystems which otherwise have no control of the command line. (Apache 2.0
uses this to pass params to the modules which handle request processing)  By
using sys.startoptions, it would also be portable to systems which don't
usually use a command line (Windows, Mac, GUIs, etc); they could potentially
get those options from the registry or whatever.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/