[Patches] [ python-Patches-504943 ] call warnings.warn with Warning instance
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 20 Mar 2002 10:21:39 -0800
Patches item #504943, was opened at 2002-01-17 11:50
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=504943&group_id=5470
Category: Library (Lib)
>Group: Python 2.3
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Walter Dörwald (doerwalter)
>Assigned to: Walter Dörwald (doerwalter)
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.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-03-20 13:21
Message:
Logged In: YES
user_id=6380
Looks OK. Give it a try.
----------------------------------------------------------------------
Comment By: Walter Dörwald (doerwalter)
Date: 2002-03-20 12:26
Message:
Logged In: YES
user_id=89016
Now that I have write access can I check this in?
----------------------------------------------------------------------
Comment By: Walter Dörwald (doerwalter)
Date: 2002-03-18 10:46
Message:
Logged In: YES
user_id=89016
The new version includes a patch to the documentation and
an entry in Misc/NEWS
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-03-18 08:45
Message:
Logged In: YES
user_id=6380
Nice idea. Where's the documentation patch?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=504943&group_id=5470