Skip to content

Instantly share code, notes, and snippets.

@oxbits
Last active May 21, 2017 23:32
Show Gist options
  • Save oxbits/9ae45c8c170c84e8d2a95732ea3bdd42 to your computer and use it in GitHub Desktop.
Save oxbits/9ae45c8c170c84e8d2a95732ea3bdd42 to your computer and use it in GitHub Desktop.
from inspect import currentframe as cf
from types import FunctionType as FT
(
lambda x: 1 if x <= 1 else FT(
*(
lambda y: (
y.f_code, y.f_globals
)
)(cf())
)(x-1)*x
)(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment