mirror of
https://github.com/jazzband/contextlib2.git
synced 2026-03-16 21:50:24 +00:00
Note ExitStack's new-style class requirement
This commit is contained in:
parent
0433cd4844
commit
1fb0cf99cb
1 changed files with 4 additions and 0 deletions
|
|
@ -310,6 +310,10 @@ Functions and classes provided:
|
|||
foundation for higher level context managers that manipulate the exit
|
||||
stack in application specific ways.
|
||||
|
||||
Context managers used with :class:`ExitStack` must be new-style classes -
|
||||
this is the default on Python 3, but requires explicitly inheriting from
|
||||
:class:`object` or another new-style class in Python 2.
|
||||
|
||||
.. versionadded:: 0.4
|
||||
Part of the standard library in Python 3.3 and later
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue