> [Trent] > > What if someone needs to do something in Python code for either Win32 or > > Win64 but not both? Or should this never be necessary (not > > likely). I would > > like Mark H's opinion on this stuff. [Mark] > OK :-) > > I have always thought that it _would_ move to "win64", and the official way > of checking for "Windows" will be sys.platform[:3]=="win". > > In fact, Ive noticed Guido use this idiom (both stand-alone, and as :if > sys.platform[:3] in ["win", "mac"]) > > It will no doubt cause a bit of pain, but IMO it is cleaner... Hmm... I'm not sure I agree. I read in the comments that the _WIN32 symbol is defined even on Win64 systems -- to test for Win64, you must test the _WIN64 symbol. The two variants are more similar than they are different. While testing sys.platform isn't quite the same thing, I think that the same reasoning goes: a win64 system is everything that a win32 system is, and then some. So I'd vote for leaving sys.platform alone (i.e. "win32" in both cases), and providing another way to test for win64-ness. I wish we had had the foresight to set sys.platform to 'windows', but since we hadn't, I think we'll have to live with the consequences. The changes that Trent had to make in the standard library are only the tip of the iceberg... --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4