-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working
Description
Code or Screenshots
reveal_type(-129 % 16) # information: Type of "-129 % 16" is "Literal[-1]"
reveal_type(-129 % 32) # information: Type of "-129 % 32" is "Literal[-1]"
reveal_type(-129 % 64) # information: Type of "-129 % 64" is "Literal[-1]"
reveal_type(-129 % 100) # information: Type of "-129 % 100" is "Literal[-29]"
reveal_type(256 % -32678) # information: Type of "256 % -32678" is "Literal[256]"
reveal_type(256 % -129) # information: Type of "256 % -129" is "Literal[127]"Python and JavaScript have different behaviors when modulo operations are performed on operands with different signs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder#description
VS Code extension or command-line
Command-line version 1.1.397
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working