All Samples(12424) | Call(10989) | Derive(0) | Import(1435)
Issue a warning, or maybe ignore it or raise an exception.
All Samples(2438) | Call(2336) | Derive(0) | Import(102)
Insert an entry into the list of warnings filters (at the front).
'action' -- one of "error", "ignore", "always", "default", "module",
or "once"
'message' -- a regex that the warning message must match
'category' -- a class that the warning must be a subclass of
'module' -- a regex that the module name must match
'lineno' -- an integer line number, 0 matches all warnings
'append' -- if true, append to the list of filters
All Samples(1702) | Call(897) | Derive(0) | Import(805)
Issue a deprecation warning for Python 3.x related changes. Warnings are omitted unless Python is started with the -3 option.
All Samples(858) | Call(802) | Derive(0) | Import(56)
A context manager that copies and restores the warnings filter upon exiting the context. The 'record' argument specifies whether warnings should be captured by a custom implementation of warnings.showwarning() and be appended to a list returned by the context manager. Otherwise None is returned by the context manager. The objects appended to the list are arguments whose attributes mirror the arguments to showwarning(). The 'module' argument is to specify an alternative module to the module(more...)
All Samples(825) | Call(815) | Derive(0) | Import(10)
Insert a simple entry into the list of warnings filters (at the front).
A simple filter matches all modules and messages.
'action' -- one of "error", "ignore", "always", "default", "module",
or "once"
'category' -- a class that the warning must be a subclass of
'lineno' -- an integer line number, 0 matches all warnings
'append' -- if true, append to the list of filters
All Samples(397) | Call(381) | Derive(0) | Import(16)
Clear the list of warning filters, so that no filters are active.
All Samples(0) | Call(0) | Derive(0) | Import(0)
list() -> new empty list list(iterable) -> new list initialized from iterable's items
All Samples(0) | Call(0) | Derive(0) | Import(0)
No Document.
All Samples(12) | Call(11) | Derive(0) | Import(1)
Hook to write a warning to a file; replace if you like.
All Samples(0) | Call(0) | Derive(0) | Import(0)
Holds the result of a single showwarning() call.
All Samples(0) | Call(0) | Derive(0) | Import(0)
No Document.
All Samples(1) | Call(0) | Derive(0) | Import(1)
Cache lines from files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name.