Hi! gvwilson@nevex.com: > I'd also like to ask (separately) that assignment to None be defined as a > no-op, so that programmers can write: > > year, month, None, None, None, None, weekday, None, None = gmtime(time()) You can already do this today with 1.5.2, if you use a 'del None' statement: Python 1.5.2 (#1, Jul 23 1999, 06:38:16) [GCC egcs-2.91.66 19990314/Linux (egcs- on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> from time import time, gmtime >>> year, month, None, None, None, None, weekday, None, None = gmtime(time()) >>> print year, month, None, weekday 2000 3 0 3 >>> del None >>> print year, month, None, weekday 2000 3 None 3 >>> if None will become a keyword in Py3K this pyidiom should better be written as year, month, None, None, None, None, ... = ... if sys.version[0] == '1': del None or try: del None except SyntaxError: pass # Wow running Py3K here! I wonder, how much existinng code the None --> keyword change would brake. Regards, Peter
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