[issue1208] Match object should be guaranteed to always be true

2007-09-26 Thread Martin Horcicka
New submission from Martin Horcicka: Many people expect the match object from the re module to always be true. They use it this way: if regexp.match(string): do_something() Some people do not expect it and use it differently: if regexp.match(string) is not None: do_something() Even

[issue1181] Redefine clear() for os.environ to use unsetenv() if possible

2007-09-19 Thread Martin Horcicka
New submission from Martin Horcicka: This patch makes os.environ.clear() to have the same effect as: for name in os.environ.keys(): del os.environ[name] I believe that most people expect the effects to be the same anyway. The practical benefit is a simpler redefinition of the whole