-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clarify assert doc entry #45998
clarify assert doc entry #45998
Conversation
The `@assert` doc entry is somewhat confusing, first appearing to encourage then discourage its use. This attempts to clarify it for the general user.
Is there a way to preserve the warning about side effects? This aspect seems important if the function opens a file or something like that. |
reintroduced the side-effects comment
I tried to rephrase it a little to improve the proposal, and reintroduced the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@assert 7
throws. Perhaps we should mention @assert expr
will throw unless expr
evaluates to true
.
The
@assert
doc entry is somewhat confusing, first appearing to encourage then discourage its use. This attempts to clarify it for the general user.