surprising behaviour of os.environ.clear
musiccomposition at gmail.com
Sun Jun 29 04:39:03 CEST 2008
On Jun 28, 1:23 am, Tim Roberts <t... at probo.com> wrote:
> Benjamin <musiccomposit... at gmail.com> wrote:
> >This is because of how os.environ is implement with a UserDict
> Why? I mean, I can see that it happens, but I don't understand why being a
> UserDict causes this.
The contents of a UserDict is stored in UserDict.data. When
UserDict.clear is called, that contents is simply cleared. environ
needs to override this is to unset env variable and then update the
> Tim Roberts, t... at probo.com
> Providenza & Boekelheide, Inc.
More information about the Python-list