Skip to content

Commit

Permalink
Note ExitStack's new-style class requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoghlan committed May 2, 2016
1 parent 0433cd4 commit 1fb0cf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1fb0cf9

Please sign in to comment.