Skip to content

Contexts should have __enter__ and __exit__ methods #558

@bgrant

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions