JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
85 stars 3 forks source link

Proper resource handling #197

Open JSAbrahams opened 4 years ago

JSAbrahams commented 4 years ago

Current Issue

We don't check whether a resource implements __enter__ and __exit__.

High-level description of the feature

Check that resource type implements __enter__ and __exit__ when using it as a resource.

Description of potential implementation

Add two extra constraints for these magic functions.