[Python-Dev] Proposed resolutions for open PEP 343 issues (original) (raw)
Guido van Rossum guido at python.org
Sat Oct 22 23:14:34 CEST 2005
- Previous message: [Python-Dev] Proposed resolutions for open PEP 343 issues
- Next message: [Python-Dev] Proposed resolutions for open PEP 343 issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Here's another argument against automatically decorating context.
What if I want to have a class with a context method that returns a custom context manager that doesn't involve applying @contextmanager to a generator?
While technically this is possible with your proposal (since such a method wouldn't be a generator), it's exceedingly subtle for the human reader. I'd much rather see the @contextmanager decorator to emphasize the difference.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Proposed resolutions for open PEP 343 issues
- Next message: [Python-Dev] Proposed resolutions for open PEP 343 issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]