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/2000-December/010933.html below:

[Python-Dev] Warning Framework (PEP 230)

[Python-Dev] Warning Framework (PEP 230)Barry A. Warsaw barry@digicool.com
Mon, 11 Dec 2000 11:02:29 -0500
Some of my thoughts after reading the PEP and Paul/Guido's exchange.

- A function in the warn module is better than one in the sys module.
  "from warnings import warn" is good enough to not warrant a
  built-in.  I get the sense that the PEP description is behind
  Guido's currently implementation here.

- When PyErr_Warn() returns 1, does that mean a warning has been
  transmuted into an exception, or some other exception occurred
  during the setting of the warning?  (I think I know, but the PEP
  could be clearer here).

- It would be nice if lineno can be a range specification.  Other
  matches are based on regexps -- think of this as a line number
  regexp.

- Why not do setupwarnings() in site.py?

- Regexp matching on messages should be case insensitive.

- The second argument to sys.warn() or PyErr_Warn() can be any class,
  right?  If so, it's easy for me to have my own warning classes.
  What if I want to set up my own warnings filters?  Maybe if `action'
  could be a callable as well as a string.  Then in my IDE, I could
  set that to "mygui.popupWarningsDialog".

-Barry



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