9 Sep
2017
9 Sep
'17
8:26 p.m.
09.09.17 21:46, Barry Warsaw пише:
One use case would be for PEP 553, where you could set the breakpoint environment variable to the following in order to effectively disable it::
$ setenv PYTHONBREAKPOINT=noop
Are there other use cases? PEP 553 still is not approved, and you could use other syntax for disabling breakpoint(), e.g. setting PYTHONBREAKPOINT to an empty value. It looks to me that in all other cases it can be replaced with `lambda *args, **kwds: None` (actually the expression can be even simpler in concrete cases). I can't remember any case when I needed an noop() function (unlike to an identity() function or null context manager).