A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-May/053315.html below:

[Python-Dev] "begin" as keyword for pep 340

[Python-Dev] "begin" as keyword for pep 340 [Python-Dev] "begin" as keyword for pep 340Adam Souzis adamsz at gmail.com
Wed May 4 18:41:02 CEST 2005
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 ;)
More information about the Python-Dev mailing list

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