fork download
  1. def a():
  2. print('HUI')
  3.  
  4. def b():
  5. print('Pyzda')
  6.  
  7. handlers = {'hui':a, 'pizda':b}
  8.  
  9. g=lambda f: (callable(handlers.get(f)) and (handlers.get(f))) or (lambda: (_ for _ in ()).throw(NameError('Function %s is not defined'%f)))()
  10.  
  11. g('hui')()
  12. g('pizda')()
  13. g('govno')()
Runtime error #stdin #stdout #stderr 0.01s 28384KB
stdin
Standard input is empty
stdout
HUI
Pyzda
stderr
Traceback (most recent call last):
  File "./prog.py", line 13, in <module>
  File "./prog.py", line 9, in <lambda>
  File "./prog.py", line 9, in <lambda>
  File "./prog.py", line 9, in <genexpr>
NameError: Function govno is not defined