Skip to content

Conversation

@miguelusque
Copy link

The 'assert' syntax is that this statement doesn’t require a pair of parentheses to group the expression and the optional message. In Python, 'assert' is a statement instead of a function.

The parentheses turn the assertion expression and message into a two-item tuple, which always evaluates to true, making the assertion useless.

The 'assert' syntax is that this statement doesn’t require a pair of parentheses to group the expression and the optional message. In Python, 'assert' is a statement instead of a function.

The parentheses turn the assertion expression and message into a two-item tuple, which always evaluates to true, making the assertion useless.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant