Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use parentheses on method access on float and int literals (#2799)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Felix Hildén <felix.hilden@gmail.com>
- Loading branch information
1 parent
b92822a
commit 777cae5
Showing
8 changed files
with
88 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
x = 123456789 .bit_count() | ||
x = (123456).__abs__() | ||
x = .1.is_integer() | ||
x = 1. .imag | ||
x = 1E+1.imag | ||
x = 1E-1.real | ||
x = 123456789.123456789.hex() | ||
x = 123456789.123456789E123456789 .real | ||
x = 123456789E123456789 .conjugate() | ||
x = 123456789J.real | ||
x = 123456789.123456789J.__add__(0b1011.bit_length()) | ||
x = 0XB1ACC.conjugate() | ||
x = 0B1011 .conjugate() | ||
x = 0O777 .real | ||
x = 0.000000006 .hex() | ||
x = -100.0000J | ||
|
||
if 10 .real: | ||
... | ||
|
||
y = 100[no] | ||
y = 100(no) | ||
|
||
# output | ||
|
||
x = (123456789).bit_count() | ||
x = (123456).__abs__() | ||
x = (0.1).is_integer() | ||
x = (1.0).imag | ||
x = (1e1).imag | ||
x = (1e-1).real | ||
x = (123456789.123456789).hex() | ||
x = (123456789.123456789e123456789).real | ||
x = (123456789e123456789).conjugate() | ||
x = 123456789j.real | ||
x = 123456789.123456789j.__add__(0b1011.bit_length()) | ||
x = 0xB1ACC.conjugate() | ||
x = 0b1011.conjugate() | ||
x = 0o777.real | ||
x = (0.000000006).hex() | ||
x = -100.0000j | ||
|
||
if (10).real: | ||
... | ||
|
||
y = 100[no] | ||
y = 100(no) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters