[issue7879] Too narrow platform check in test_datetime

Alexander Belopolsky report at bugs.python.org
Wed May 26 19:06:23 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

Mark,

I have zero experience with Windows and don't even have a win32 machine to test the patch.

On the other hand the patch is so simple that I think it can be reviewed based on theoretical considerations.

This is probably bikesheding, but I have a slight preference for  os.name in ("nt", "ce").  The reason is that sys.platform is fixed when python is built while os.name is (in theory) determined at run-time.

Also, sys.platform == "win32", appears to be false on 64 bit Windows, but I think it is actually true.

Finally, explicit better than implicit.  A change from if os.name == "nt" to  os.name in ("nt", "ce") gives obviously a strictly wider check. On the other hand it is not obvious to me how the current patch will affect Cygwin platform.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7879>
_______________________________________


More information about the Python-bugs-list mailing list