Issue #4 wontfix

Report number of registered callbacks as ExitStack.__len__

Nick Coghlan
repo owner created an issue

It may be useful to allow truth testing of ExitStack instances. The most logical way to support that would be to report len(self._exit_callbacks) as the result of ExitStack.len.

I don't have a concrete use case for this behaviour, though, so the feature can wait until someone asks for it.

Comments (3)

  1. Log in to comment