I'm a bit surpised that no one has yet [1] suggested "begin" as a keyword instead "block" as it seems to express the intent of blocks and is concise and readable. For example, here are the examples in PEP 340 rewritten using "begin":
begin locking(): ... begin opening(path) as f: #how about: begin using_file(path) as f: ... begin transaction(db): ... begin auto_retry(3): ... begin redirecting_stdout: .... Probably the biggest problem with "begin" is that it is relatively common as an identify. For example, Greping through Python's Lib directory, begin is used as a method name twice (in httplib and idlelib.pyshell) and as a local twice (in mhlib and pyassemb). However, i can't think of many instances where there would be ambiguity in usage -- could 'begin' be a pseudo-identifier like "as" for some transitional time? -- adam [1] (Or maybe GMail's search has failed me ;) _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
