You need parens:
(4).__str__()
The problem is the lexer thinks “4.” is going to be a floating-point number.
Also, this works:
x = 4
x.__str__()
You need parens:
(4).__str__()
The problem is the lexer thinks “4.” is going to be a floating-point number.
Also, this works:
x = 4
x.__str__()