[Python-Dev] PEP 377 - allow __enter__() methods to skip the statement body
Nick Coghlan
ncoghlan at gmail.com
Mon Mar 16 23:40:49 CET 2009
Guido van Rossum wrote:
> On Mon, Mar 16, 2009 at 3:19 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> Guido van Rossum wrote:
>>>> Hell, I largely wrote PEP 377 to try to get out of having to document
>>>> these semantic problems with the with statement - if I'm having trouble
>>>> getting *python-dev* to grasp the problem, what hope do other users of
>>>> Python have?
>>> Hell, if you can't come up with a real use case, why bother? :-)
>> I figured I'd try for a solution that didn't offend my sense of
>> aesthetics before caving in and working out how to better document the
>> limitations of the status quo :)
>>
>>> Perhaps you could address my worry about introducing an obscure
>>> BaseException subclass that will forever add to the weight of the list
>>> of built-in exceptions in all documentation?
>> Since this is really just a matter of the aesthetics of the underlying
>> design from my point of view rather than solving a real world problem, I
>> don't have a good answer for you.
>>
>> In the absence of reports of actual problems caused by this limitation,
>> should I consider the PEP rejected?
>
> Yes -- sorry for your wasted efforts.
Not wasted - I prefer having this as a recognised limitation of the
semantics rather than as an accident of the implementation.
Who knows, maybe somebody will come up with a real world use case some
day and we can drag the PEP out and dust it off a bit :)
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
More information about the Python-Dev
mailing list