Just so people know, we started discussing over on the stdlib-sig the idea of trying to convince Steven Bethard to contribute argparse to the standard library as a way to improve the argument parsing situation in the standard library. On Thu, Sep 10, 2009 at 13:44, Guido van Rossum <guido@python.org> wrote:
That's not particularly more expressive than what optparse gives you today, except for the use of a function with a side effect on a magic global (how the heck did options.port suddenly get a value?!) and the potential for confusing tornado.options with tornado.options.options.
On Thu, Sep 10, 2009 at 12:50 PM, Andrey Fedorov <anfedorov@gmail.com> wrote:
I remember seeing a bit of discussion about improving Python's default options parsing... Tornado's seems very impressive [1]:
from tornado.options import define, options
define("port", default=8888, help="run on the given port", type=int)
print options.port
What does everyone think?
- Andrey
1. http://github.com/facebook/tornado/blob/9a8bd2fb6fd6279be16d6f0a2e57e49fe1b9...
-- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas