From: Stephen Hansen on
On 6/11/10 10:00 AM, Nathan Rice wrote:
> I've tried using args/kwargs, however I found it difficult to avoid
> having arguments in my signature re-ordered, and it is also a source
> of bugs.
>
> Has anyone come up with a good solution for dealing with arguments in
> situations like this where you'd like to encapsulate lower level stuff
> for neophyte users but make it easily available to advanced users?

I'd just use a dictionary, with some namespacey sort of names for the
arguments. Sort of like how layered WSGI apps have their 'environ' object.

Its like, environ["beaker.session.blah"] = "fubar". Though that's
something of a mix of configuration and state.

--

Stephen Hansen
... me+list/python (AT) ixokai (DOT) io