$ echo "1.__str__()" | python3 tokenize.py
1,0-1,2: NUMBER '1.'
1,2-1,9: NAME '__str__'
1,9-1,10: OP '('
1,10-1,11: OP ')'
1,11-1,12: NEWLINE '\n'
2,0-2,0: ENDMARKER ''
>>> (1).__str__()
'1'
$ echo "(1).__str__()" | python3 tokenize.py
1,0-1,1: OP '('
1,1-1,2: NUMBER '1'
1,2-1,3: OP ')'
1,3-1,4: OP '.'
1,4-1,11: NAME '__str__'
1,11-1,12: OP '('
1,12-1,13: OP ')'
1,13-1,14: NEWLINE '\n'
2,0-2,0: ENDMARKER ''
>>> 1..__str__()
'1.0'
$ echo "1..__str__()" | python3 tokenize.py
1,0-1,2: NUMBER '1.'
1,2-1,3: OP '.'
1,3-1,10: NAME '__str__'
1,10-1,11: OP '('
1,11-1,12: OP ')'
1,12-1,13: NEWLINE '\n'
2,0-2,0: ENDMARKER ''

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store