-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Description
Hey.
It’s been discussed already previously (but AFAICS with no real outcome)...
IMO warnings.WarningMessage
should be documented, at least those parts which one can consider public API.
For example, when using warnings.catch_warnings
with a custom warning class (e.g. derived from UserWarning
and with some custom attributes attached), one may want to actually access those custom attributes from the caught warnings.
One can, it seems, as that warning object seems to be in the .message
attribute of the warnings.WarningMessage
... which may be a bit tricky to spot (message is usually thought of as some string, and thus as the first of the args
of UserWarning
).
I guess documenting the other attributes like category
, etc. pp. wouldn’t harm either. :-)
Thanks,
Chris.
Metadata
Metadata
Assignees
Labels
Projects
Status