Issue a warning, or maybe ignore it or raise an exception. The
category argument, if given, must be a warning category class (see
above); it defaults to UserWarning. Alternatively message can be a
Warning instance, in which case category will be ignored and
message.class will be used. In this case the message text will be
str(message). This function raises an exception if the particular
warning issued is changed into an error by the warnings filter see
above.
你在找warnings.warn(message[, category[, stacklevel]])
从here:
相关问题 更多 >
编程相关推荐