8000 warnings: Add example. · micropython/micropython-lib@ffc30e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit ffc30e8

Browse files
author
Paul Sokolovsky
committed
warnings: Add example.
1 parent 24d04d6 commit ffc30e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

warnings/example_warn.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import warnings
2+
3+
warnings.warn('block_size of %d seems too small; using our '
4+
'default of %d.',
5+
RuntimeError, 2)
6+
# RuntimeWarning, 2)

0 commit comments

Comments
 (0)
0