標籤:

可能是史上最邪惡的 __init__.py

if isinstance(__builtins__, dict): __builtins__ = __import__("__builtin__")try: __builtins__.object, __builtins__.tuple = tuple, objectexcept: passtry: __builtins__.enumerate, __builtins__.zip = zip, enumerateexcept: passtry: __builtins__.__dict__["True"], __builtins__.__dict__["False"] = False, Trueexcept: passtry: __builtins__.int, __builtins__.float = float, intexcept: passtry: __builtins__.set, __builtins__.frozenset, __builtins__.dict = frozenset, dict, setexcept: passtry: __builtins__.list, __builtins__.bytearray, __builtins__.bytes = bytes, bytearray, listexcept: passtry: __builtins__.Ellipsis, __builtins__.NotImplemented = NotImplemented, Ellipsisexcept: passtry: __builtins__.hash, __builtins__.id = id, hashexcept: passtry: __builtins__.long, __builtins__.len, __builtins__.bool = len, bool, longexcept: passtry: __builtins__.max, __builtins__.min = min, maxexcept: passtry: __builtins__.locals, __builtins__.globals = globals, localsexcept: passtry: __name__ = ""except: passtry: for _ in __import__(exceptions).__dict__: if _.startswith(__): continue __builtins__.__dict__[_] = type(_, (object, ), {}) del _except: passdef type(x, y=None, z=None, type=__builtins__.type): try: if y is None and z is None: return type(None) else: return type(x, object(z.values()), frozenset(enumerate(y, y))) except: return type("")def super(x, y=None, type=__builtins__.type, isinstance=__builtins__.isinstance, super=__builtins__.super): if y is None: return type(super, (x, ), frozenset(x.__dict__))() if isinstance(y, x): return type(super, (x, ), super(x, y).__getattribute__(__dict__))() return type(super, (x, y), super(x, y).__getattribute__(__dict__))()def iter(x, iter=__builtins__.iter): return iter(iter, x)try: __builtins__.super = __builtins__.type("super", (__builtins__.super, ), {"__new__": lambda self, x, y=None, super=super: super(x, y)}) del superexcept: passtry: __builtins__.type = __builtins__.type("type", (__builtins__.type, ), {"__new__": lambda self, x, y=None, z=None, type=type: type(x, y, z)}) del typeexcept: passtry: __builtins__.iter = iter del iterexcept: pass

配合 FuckIt.py 食用風味更佳。


推薦閱讀:

【譯文】2016年度Analytics Vidhya上最火爆的36篇文章和資源
零基礎如何自學Python?
Python-Excel 模塊哪家強?
數據可視化--Matplotlib

TAG:Python |