%title Python - [[PEP3131]] :: Handling of weird unicode characters - [[Python Operators]] :: And operator overloading - [[Python Pipeline]] = String IO = Open strings as file descriptors {{{python import io f = io.StringIO("Hello, World") f.read() # ⇒ 'H' }}} = Disable typing for line = {{{python somethintg_which_doesnt_typecheck() # type: ignore }}} = Properties = property {{{python field = property(get_f, set_f) }}} {{{python class C: def __init__(self): self._x = 10 @property def x(self): return self._x @x.setter def x(self, value): self._x = value }}} = Imports are lazy = == main.py == {{{python import sys match sys.argv: case [prgr]: print('Please give a sub-option') case [prgr, 'a', *args]: from a import x print(f'x = {x}') case [prgr, 'b', *args]: from b import x print(f'x = {x}') }}} == a.py == {{{python print('Importing a') x = 10 }}} == b.py == {{{python print('Importing b') x = 20 }}}