[Patches] [ python-Patches-504943 ] call warnings.warn with Warning instance

noreply@sourceforge.net noreply@sourceforge.net
Thu, 17 Jan 2002 08:50:27 -0800


Patches item #504943, was opened at 2002-01-17 08:50
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=504943&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Walter Dörwald (doerwalter)
Assigned to: Nobody/Anonymous (nobody)
Summary: call warnings.warn with Warning instance

Initial Comment:
This patch makes it possible to pass Warning instances 
as the first argument to warnings.warn. In this case 
the category argument will be ignored. The message
text used will be str(warninginstance). This makes it 
possible to implement special logic in a custom 
Warning class by implemening the __str__ method.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=504943&group_id=5470