Skip to content

Remove parenthesis from asserts#699

Open
miguelusque wants to merge 1 commit intoNVIDIA:mainfrom
miguelusque:patch-1
Open

Remove parenthesis from asserts#699
miguelusque wants to merge 1 commit intoNVIDIA:mainfrom
miguelusque:patch-1

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