Daniel Bershatsky <bepshat...@yandex.ru> writes: > ... > Proposal > ======== > There is not any mechanism to defer the execution of function in > python. In > order to mimic defer statement one could use either try/except > construction or > use context manager in with statement. > ...
Related: "Python equivalent of golang's defer statement" https://stackoverflow.com/questions/34625089/python-equivalent-of-golangs-defer-statement _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/