kennethreitz/args — pull request #13 by snh (2012-07-27 13:06:29+00:00)
Title: Basic support for assignments.

I noticed that an open issue was to add support for assignments, so I decided to have a go at adding basic support.

A few notes on the implementation,

- Assignments in a variety of formats are supported.
- Supports multiple values for one assignment as well as empty/blank values.
- Effectively any attribute containing an equals sign is treated as an assignment.

The following are examples of some of the supported formats for the assignment argument.

--multivalueargument=value1 --multivalueargument=value2 --emptyvalue= -anotherformat=value3 yetanotherformat=value4

The resulting output for the above being,

OrderedDict([('--multivalueargument', ), ('--emptyvalue', ), ('-anotherformat', ), ('yetanotherformat', )])