> > 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. Yes, would be nice - but I have no time for that if I want to make a release this week (or later). I think I'll go for something stupid and simple now, like just using -q to turn on division warnings, and nothing else (the -Dnew option is not very useful I think). --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4