[Python-ideas] Retrying EAFP without DRY (original) (raw)

Steven D'Aprano steve at pearwood.info
Sat Jan 21 05:16:36 CET 2012


Benjamin Peterson wrote:

Bruce Leban <bruce at ...> writes:

FWIW, if this turns out to be a good idea, an alternate spelling that would not require a new keyword is 'try again'. How is that not a new keyword?

"again" could be a not-actually-a-keyword keyword like "as" used to be.

[steve at sylar ~]$ python2.3 Python 2.3.7 (#1, Aug 12 2010, 00:17:29) [GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

as = 20 import math as m m.sin(as) 0.91294525072762767

Not that I support that, but it is possible.

-- Steven



More information about the Python-ideas mailing list