Difference between revisions of "Test page"

From Bitnami MediaWiki
Jump to navigation Jump to search
Line 4: Line 4:
 
$e=mc^2$ supports latex
 
$e=mc^2$ supports latex
 
<code>testing code tag</code>
 
<code>testing code tag</code>
 +
 +
<syntaxhighlight lang=python>
 +
def catch(func, *args, handle=lambda e: None, **kwargs)
 +
try:
 +
    return func(*args, **kwargs)
 +
  except Exception as e:
 +
    return handle(e)
 +
</syntaxhighlight>

Revision as of 13:56, 30 December 2020

i'm wonder how this works

  • supports lists
  1. supports numbering

$e=mc^2$ supports latex testing code tag

def catch(func, *args, handle=lambda e: None, **kwargs)
 try:
    return func(*args, **kwargs)
  except Exception as e:
    return handle(e)