Skip to content

Contexts should have __enter__ and __exit__ methods #558

Description

@bgrant

... so we can use them in with statements.

with Context() as ctxt:
    # do some stuff

We can already hack something with contextlib.closing, but it would be nicer if we didn't have to.

Activity

  1. added this to the 0.5 milestone on Aug 5, 2014
  2. modified the milestones: 0.5, 0.6 on Aug 5, 2014
  3. self-assigned this
    on Aug 11, 2014
  4. modified the milestones: 0.7, 0.6 on Oct 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions