OILS / mycpp / examples / invalid_format_strings.py View on Github | oils.pub

22 lines, 7 significant
1#!/usr/bin/env python2
2"""
3invalid_format_strings.py
4"""
5from __future__ import print_function
6
7from mycpp.mylib import log
8
9
10def run_tests():
11 # type: () -> None
12
13 x = 33
14
15 print('x = %x' % x)
16
17 # caught by MyPy
18 # print('x = %z' % x)
19
20 print('x = %c' % x)
21
22 log('x = %c', x)