[Python-ideas] PEP-3151 pattern-matching
Nick Coghlan
ncoghlan at gmail.com
Fri Apr 8 11:27:22 CEST 2011
On Fri, Apr 8, 2011 at 6:59 PM, M.-A. Lemburg <mal at egenix.com> wrote:
> Their use may be inconsistent in a few places, but those cases
> are still well-defined by the implementation, so code relying
> on that well-defined behavior will break in subtle ways.
The phrases "defined by the implementation" and "well-defined" do not
belong in the same sentence.
> Example:
>
> If code catches select.error (which is only raised for select.select()
> and poll_object.poll() calls), because the try...except is expecting
> a possible error from the select call used in the try...except
> block, it will most likely do the wrong thing for some IOError
> raised by a logging file I/O call in that same block.
A deprecation period for the merged exceptions would be advisable.
That's an argument in favouring of figuring out how to implement
correct deprecation warnings for the merges, not an argument in favour
of not doing them.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list