A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-April/078923.html below:

[Python-Dev] Dealing with a desired change to warnings.showwarning()

[Python-Dev] Dealing with a desired change to warnings.showwarning() [Python-Dev] Dealing with a desired change to warnings.showwarning()Antoine Pitrou solipsis at pitrou.net
Mon Apr 28 10:26:22 CEST 2008
Brett Cannon <brett <at> python.org> writes:
> As http://bugs.python.org/issue2705 points out, though, since the
> function has been documented as being allowed to be overridden, this
> potentially breaks existing showwarning() implementations. That means
> something needs to change.
> 
> One option is to introduce a new function. But what to name it?
> show_warning()? That small of a name change seems like asking for
> trouble, but showwarning_ex() just seems wrong to use in Python code.

But then what happens if a library overrides one of the callbacks and another
library overrides the other one? Fixing the original "problem" seems to
introduce other hairier ones.

As a Benjamin pointed out in the bug comments, the sane solution would be to
keep an unique callback and mention the small change in the release notes.

Regards

Antoine.


More information about the Python-Dev mailing list

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