| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…itStack __enter__(), __exit__(), __aenter__(), and __aexit__() can now be arbitrary descriptors, not only normal methods, for consistency with the "with" and "async with" statements.
There was a problem hiding this comment.
The general approach looks right to me, but is it feasible to avoid adding the dependency on the inspect module by moving that helper function somewhere lower in the import stack?
Sorry, something went wrong.
There was a problem hiding this comment.
In the absence of a Python binding for the actual special method lookup logic, the lazy import looks like a reasonable mitigation to me.
Sorry, something went wrong.
…itStack (python#144420) __enter__(), __exit__(), __aenter__(), and __aexit__() can now be arbitrary descriptors, not only normal methods, for consistency with the "with" and "async with" statements.
…itStack (python#144420) __enter__(), __exit__(), __aenter__(), and __aexit__() can now be arbitrary descriptors, not only normal methods, for consistency with the "with" and "async with" statements.
| Back | FazBrowse Home | New Git URL |
__enter__(), __exit__(), __aenter__(), and __aexit__() can now be arbitrary descriptors, not only normal methods, for consistency with the "with" and "async with" statements.