On Jun 28, 1:23 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > Benjamin <[EMAIL PROTECTED]> wrote: > > >This is because of how os.environ is implement with a UserDict > >subclass. > > 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 actual dict. > -- > Tim Roberts, [EMAIL PROTECTED] > Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list