1 2 3 4 5 6 7 8 9import warnings # Does not raise a type error warnings.warn(1) # Raises a type error with warnings.catch_warnings(): warnings.filterwarnings("ignore", "test") warnings.warn(1)
1 2 3 4 5 6 7 8 9
import warnings # Does not raise a type error warnings.warn(1) # Raises a type error with warnings.catch_warnings(): warnings.filterwarnings("ignore", "test") warnings.warn(1)