Good solutions for passing around large numbers of arguments in a layered architecture?

James Mills prologic at shortcircuit.net.au
Fri Jun 11 13:35:17 EDT 2010


On Sat, Jun 12, 2010 at 3:00 AM, Nathan Rice
<nathan.alexander.rice at gmail.com> 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?

Use a container instead and pass this around. eg: an Environment class.

cheers
James



More information about the Python-list mailing list