At 05:20 PM 4/25/2006 -0700, Guido van Rossum wrote: >I would augment #1 to clarify that if you have __enter__ and __exit__ >you may not have __context__ at all; if you have all three, >__context__ must return self. Well, requiring the __context__ allows us to ditch the otherwise complex problem of why @contextfactory functions' return value is usable by "with", without having to explain it separately. So, I don't think there's any reason to provide an option; there should be Only One Way To Do It. Well, actually, two. That is, you can have one method or all three. Two is right out. :) (ObMontyPython: Wait, I'll come in again...)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4