"Assert"의 두 판 사이의 차이

1번째 줄: 1번째 줄:
[[category: Error]]
[[category: Error]]
;assert
;die


==Python==
==Python==

2018년 1월 18일 (목) 11:15 판

assert
die

1 Python

assert 1 == 1
assert 1 == 2
# AssertionError
assert 1 == 2, 'Oh, my goodness.'
# AssertionError: Oh, my goodness.

2 Perl

die unless 1 eq 1;
die unless 1 eq 2;
# Died at - line 2
die("Oh, my goodness.") unless 1 eq 2;
# Oh, my goodness. at - line 1.
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}