Assert---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Check if assertion is False
Syntax: int assert (String|bool assertion)
Description:
If it turns out that False,assert () will check the given assertion and take the appropriate action. The advantage of the string assertion is less on the head (pager overhead), when the assertion check ends, and the message contains the assertion representation, when the assertion fails.
Assertion should be used as a feature of error removal, you can use them to do a sound check (sanity-checks) to detect states (conditions), which will always be true and point to some programming errors.
Assertions will not have to be used as a normal execution, like an input parameter check. If the assertion check is inactive (not activated), it will always be corrected (correct).
The performance of assert () can be configured by Assert_option () or. ini-setting.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.