You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
6a445b60fa
This is a very convenient feature introduced in Python 3.6 by PEP 515.
11 lines
266 B
Python
11 lines
266 B
Python
# tests for things that only Python 3.6 supports, needing floats
|
|
|
|
# underscores in numeric literals
|
|
print(1_000.1_8)
|
|
print('%.2g' % 1e1_2)
|
|
|
|
# underscore supported by int/float constructors
|
|
print(float('1_2_3'))
|
|
print(float('1_2_3.4'))
|
|
print('%.2g' % float('1e1_3'))
|