Created by Yann Kaiser on 2011-12-04 and last modified on 2012-10-07
Get this branch:
bzr branch lp:~epsy/+junk/clize
Only Yann Kaiser can upload to this branch. If you are Yann Kaiser please log in for upload directions.

Related bugs

Related blueprints

Branch information

Yann Kaiser

Recent revisions

23. By Yann Kaiser on 2012-10-07

Version bump. Clize 2.0 is released.

22. By Yann Kaiser on 2012-09-30

Reconcile history between the github and launchpad mirrors.

21. By Yann Kaiser on 2012-09-30

Version bump to 2.0b1

20. By Yann Kaiser on 2012-09-30

Minor docs and examples changes.

19. By Yann Kaiser on 2012-09-30

Updated README.rst. Yes, I also changed the whitespace and added a modeline.

18. By Yann Kaiser on 2012-09-29

Added a couple docstrings and pasted copyright notice into clize.py

17. By Yann Kaiser on 2012-09-29

Added keyword-only arguments support.

If a keyword-only argument is found, clize will consider all normal arguments positional, and all keyword-only arguments options. Those with defaults are optional while others are required. This indeed makes "required options" possible, and if you do that I hate you. You can force this behaviour by using @clize.kwo instead of @clize. Python 2 compatibility is of course kept, as long as you don't use annotations or keyword-only arguments in your code.

Clize is now also slightly strictier:
* Options that don't take argument will raise an error if given one in the --option=val form.
* Required positional arguments cannot come after optional arguments. It will raise a ValueError now instead of silently making them optional with default value None.

16. By Yann Kaiser on 2012-09-29

Added an __all__ parameter so that lazy bums who use "from clize import *" don't get their namespace polluted. By the way, don't do this: tools like pyflakes won't be able to report undefined names because of it.

15. By Yann Kaiser on 2012-09-29

Fixed crash when one or more parameters had no long version.

14. By Yann Kaiser on 2012-09-29

Actually defer function inspection to when the function is called. Oops.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar RepositoryFormatKnitPack6RichRoot (bzr 1.9)
This branch contains Public information 
Everyone can see this information.