On 25/07/18 18:07, James Lu wrote:
I'm open to any changes or criticism.``` import atexit as atexit.register: # ...do various cleanup tasks... print('Goodbye') # is approximately equivalent to => import atexit def _(): # ...do various cleanup tasks... print('Goodbye') atexit.register(_) # flask example @app.route("/") def hello(): return "Hello World!" # is approximately equivalent to => as app.route('/'): return "Hello World!"
Could you explain what you expect "as" to do *in words* please? These two examples give me conflicting ideas of what you mean.
-- Rhodri James *-* Kynesim Ltd _______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
