user-supplied locals dict for function execution?
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Mon Mar 20 20:29:03 EST 2006
Lonnie Princehouse a écrit :
> Occaisionally, the first two lines of The Zen of Python conflict with
> one another.
"""
Beautiful is better than ugly.
Explicit is better than implicit.
"""
Err... I see no contradiction nor conflict here.
> An API I'm working on involves a custom namespace implementation using
> dictionaries, and I want a pretty syntax for initializing the custom
> namespaces. The fact that these namespaces are implemented as
> dictionaries is an implementation detail, and I don't want the users to
> access them directly.
Ok. That's effectively not a very common use case. And I agree than it's
far better to abstract implementation details. (And FWIW, I still have
no clean solution - but I'm not a guru).
More information about the Python-list
mailing list