[issue2144] os.environ should inherit dict

Alexander Belopolsky report at bugs.python.org
Sat Feb 23 23:33:59 CET 2008


Alexander Belopolsky added the comment:

Small comment on the patch:

                 def clear(self):
-                    for key in self.data.keys():
+                    for key in self.keys():
                         unsetenv(key)
-                        del self.data[key]
+                        del self[key]

It looks like the patched version will unsetenv twice, Change

del self[key]

to

dict.__delitem__(self, key)


+1

----------
nosy: +belopolsky

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2144>
__________________________________


More information about the Python-bugs-list mailing list