local _0 = {}; if pyscripter then exit(__import__('pc').main()); end; local _2 = os.sleep; if _2 == nil then function _2() end; end; local _3 = {}; _3.len = (function(obj) return #obj; end); _3.concat = (function(...) return table.concat({...}); end); _3.write = write or io.write; _3.yield_ = coroutine['yield']; _3.format = string.format; for _4, _5 in pairs(_G) do _3[_4] = _5; end; local _6 = '#'; local _7 = '@'; local _8 = 8; local _9 = '[PY]'; local _10 = 0; local _11 = False; local _12 = 'builtins'; _2(); local _13 = setmetatable({}, {['__mode'] = 'k'}); local _14 = setmetatable({}, {['__mode'] = 'k'}); local _15 = setmetatable({}, {['__mode'] = 'v'}); local _16 = setmetatable({}, {['__mode'] = 'k'}); local _17 = {}; local _18 = {'__index', '__newindex', '__mode', '__call', '__metatable', '__tostring', '__len', '__gc', '__unm', '__add', '__sub', '__mul', '__div', '__mod', '__pow', '__concat', '__eq', '__lt', '__le'}; local _19 = {}; for _20, _21 in pairs(_18) do _19[_21] = _20; end; local _22 = {'__new__', '__init__', '__del__', '__repr__', '__str__', '__bytes__', '__format__', '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__hash__', '__bool__', '__getattr__', '__getattribute__', '__setattr__', '__delattr__', '__dir__', '__get__', '__set__', '__delete__', '__slots__', '__call__', '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__reversed__', '__contains__', '__add__', '__sub__', '__mul__', '__truediv__', '__floordiv__', '__mod__', '__divmod__', '__pow__', '__lshift__', '__rshift__', '__and__', '__xor__', '__or__', '__radd__', '__rsub__', '__rmul__', '__rtruediv__', '__rfloordiv__', '__rmod__', '__rdivmod__', '__rpow__', '__rlshift__', '__rrshift__', '__rand__', '__rxor__', '__ror__', '__iadd__', '__isub__', '__imul__', '__itruediv__', '__ifloordiv__', '__imod__', '__ipow__', '__ilshift__', '__irshift__', '__iand__', '__ixor__', '__ior__', '__neg__', '__pos__', '__abs__', '__invert__', '__complex__', '__int__', '__float__', '__round__', '__index__', '__enter__', '__exit__', '__lua__'}; local _23 = {}; for _20, _21 in pairs(_22) do _23[_21] = _20; end; _2(); local function __build_lua_class__(_24, _25) local _26 = {}; for _27, _28 in pairs(_25) do for _29, _30 in pairs(_28) do _26[_29] = _30; end; end; _26.__bases__ = _25; _26.__name__ = _24; return _26; end; local function _24(_25) if _3.type(_25) ~= 'number' then error('This is not number', 2); end; return math.floor(_25) ~= _25; end; local function _25(_26) return _13[_26] ~= nil; end; local function PObj(_26) if _25(_26) then return _26; else return LuaObject(_26); end; end; local function LObj(_26) if _25(_26) then return _OP[82](_26); else return _26; end; end; local function _26(...) local _27 = {...}; for _28, _29 in pairs(_27) do if not _25(_29) then error('Require python object.'); end; end; return true; end; local _27 = nil; local function _28(_29, _30) if _30 == nil then _30 = _27(_29); if _30 == nil then _30 = '?'; end; end; assert(_13[_29] == nil); _13[_29] = {}; _13[_29].i = _30; _15[_30] = _29; end; local function _29(_30, _31) if _31 == nil then _31 = 1; end; _30 = LObj(_30); _31 = (_31 + 1); _30 = _3.format('%s %s', _9, tostring(_30)); _3.error(_30, _31); end; local function _30(...) local _31 = {...}; for _32, _33 in pairs(_31) do if _33 == nil then _29('SystemError: Not Enough Item'); end; end; return True; end; local function _31(...) local _32 = {...}; for _33, _34 in pairs(_32) do if _34 ~= nil then _29('SystemError: Too Many Item'); end; end; return True; end; function _24(_32) if _3.type(_32) ~= 'number' then _29('This is not number', 2); end; return math.floor(_32) ~= _32; end; _2(); local _32 = nil; _32 = nil; _0 = __build_lua_class__('_C3_MRO', {}); function _0.merge(_33) local _34 = {}; while true do local _35 = {}; for _36, _37 in ipairs(_33) do if _3.len(_37) > 0 then table.insert(_35, _37); end; end; if _3.len(_35) == 0 then return _34; end; local _38 = nil; local _39 = false; for _36, _37 in ipairs(_35) do if not _39 then _38 = _37[1]; local function _40() for _41, _42 in ipairs(_35) do for _43, _44 in ipairs(_42) do if _43 > 1 and _44 == _38 then return true; end; end; end; return false; end; _40 = _40(); if not _40 then _39 = true; else _38 = nil; end; end; end; if not _38 then _29('Inconsistent hierarchy', 2); else table.insert(_34, _38); for _36, _37 in ipairs(_35) do if _37[1] == _38 then table.remove(_37, 1); end; end; end; end; end; function _0.mro(_33) local _34 = {}; local _35 = {}; table.insert(_34, {_33}); for _36, _37 in ipairs(_33.__bases__) do local _38 = _32.get_cached_mro(_37); if _38 == nil then _38 = _32.mro(_37); end; table.insert(_34, _38); table.insert(_35, _37); _2(); end; table.insert(_34, _35); return _32.merge(_34); end; function _0.get_cached_mro(_33) if not _11 then if _33.__mro__ == nil then return nil; end; local _34 = {}; for _35, _36 in pairs(_33.__mro__) do _34[_35] = _36; end; return _34; end; _29('FAILED'); end; _32 = _0; _2(); local function _33(_34) local _35 = {}; local _36 = 1; for _37, _38 in pairs(_34) do if _17[_38] ~= nil then _35[_36] = _38; _36 = (_36 + 1); end; end; return _35; end; local function _34(_35) _2(); _28(_35); _13[_35].c = {}; local _36 = _13[_35].c; local _37 = {}; for _38, _39 in pairs(_35) do local _40 = _23[_38]; if _40 ~= nil then _37[_40] = _39; elseif _22[_38] then _37[_38] = _39; end; end; local _41 = getmetatable(_35); _14[_35] = _37; _17[_35] = false; _36.__mro__ = _32.mro(_35); return _35; end; local function _35(_36) _34(_36, true); setmetatable(_36, type); return _36; end; local function _36(_37) _17[_37] = nil; return _37; end; local function _37(_38) local _39 = _13[_38].c; if _38 ~= object then _39.__base__ = object; else _39.__base__ = None; end; _39.__name__ = str(_38.__name__); _39.__module__ = str('builtins'); _39.__bases__ = tuple(_33(_38.__bases__)); _39.__mro__ = tuple(_33(_39.__mro__)); _38.__name__ = nil; _38.__bases__ = nil; _17[_38] = true; return _38; end; _2(); _OP = {}; local function _38(_39, _40) _29(_3.concat(LObj(repr(_39)), ' are not support ', _22[_40])); end; local function _39(_40, _41) _29(_3.concat(LObj(repr(_40)), ' are not support ', _41)); end; local function _40(_41, _42, _43) _29(_3.concat('Not support ', LObj(repr(_41)), ' ', _43, ' ', LObj(repr(_42)))); end; local function _41(_42, _43, _44, _45) if _45 == nil then _45 = ''; else _45 = _3.concat(' ', _45); end; _29(_3.concat('Not support ', LObj(repr(_42)), ' ', _22[_44], ' ', LObj(repr(_43)), _45)); end; local function _42(_43, _44, _45, _46) local _47 = ''; if _46 then _47 = _3.concat('% ', LObj(repr(_46))); end; _41(_43, _44, _45, _46); end; local function _43(_44) local function _45(_46, ...) local _47 = {...}; assert(_26(_46)); local _48 = _14[getmetatable(_46)][_44]; if _48 then return _48(_46, ...); end; _38(_46, _44); end; return _45; end; local function _44(_45, _46) local function _47(_48, _49) assert(_26(_48, _49)); local _50 = _14[getmetatable(_48)]; local _51 = _14[getmetatable(_49)]; local _52 = _50[_45]; if _50 ~= _51 then local _53 = _51[_46]; if _52 == _53 then _53 = nil; end; end; if _52 then if _53 and issubclass(type(_49), type(_48)) then local _54 = _53(_49, _48); if _54 ~= NotImplemented then return _54; end; _53 = nil; end; _54 = _52(_48, _49); if _54 ~= NotImplemented then return _54; end; end; if _53 then _54 = _53(_49, _48); if _54 ~= NotImplemented then return _54; end; end; _41(_48, _49, _45); end; return _47; end; local function _45(_46, _47, _48) local _49 = _44(_47, _48); local function _50(_51, _52) assert(_26(_51, _52)); local _53 = _14[getmetatable(_51)]; local _54 = _53[_46]; if _54 then local _55 = _54(_51, _52); if _55 ~= NotImplemented then return _55; end; end; return _49(_51, _52); end; return _50; end; local function _46(_47, _48) local function _49(_50, _51, _52) assert(_26(_50, _51)); local _53 = _14[getmetatable(_50)]; local _54 = _14[getmetatable(_51)]; local _55 = _53[_47]; if _53 ~= _54 then local _56 = _54[_48]; if _55 == _56 then _56 = nil; end; end; if _55 then if _56 and issubclass(type(_51), type(_50)) then local _57 = _56(_51, _50, _52); if _57 ~= NotImplemented then return _57; end; _56 = nil; end; _57 = _55(_50, _51, _52); if _57 ~= NotImplemented then return _57; end; end; if _56 then _57 = _56(_51, _50, _52); if _57 ~= NotImplemented then return _57; end; end; _42(_50, _51, _47, _52); end; return _49; end; local function _47(_48, _49, _50) local _51 = _46(_49, _50); local function _52(_53, _54, _55) assert(_26(_53, _54) and _55 == nil or _26(_55)); local _56 = _14[getmetatable(_53)]; local _57 = _56[_48]; if _57 then local _58 = _57(_53, _54, _55); if _58 ~= NotImplemented then return _58; end; end; return _51(_53, _54, _55); end; return _52; end; _2(); local function _48(_49, _50) _26(_49, _50); return bool(_13[_49].i == _13[_50].i); end; _OP.__Is__ = _48; local function _49(_50, _51) return bool(not LObj(_OP.__Is__(_50, _51))); end; _OP.__IsNot__ = _49; local function _50(_51) return LObj(iter(_51)); end; _OP.__ForIter__ = _50; local function _51(_52) local function _53() local function _54(...) local _55 = {...}; _52(...); end; return generator(coroutine.create(_54)); end; return _53; end; _51 = _51; _OP.__Yield__ = _3.yield_; local function _52(_53, _54, _55) end; _OP.__Call__ = _52; _2(); local function _53(_54) return _23[_54]; end; _OP[1] = _43(1); _OP[2] = _43(2); _OP[3] = _43(3); _OP[4] = _43(4); _OP[5] = _43(5); _OP[6] = _43(6); _OP[7] = _43(7); _OP[8] = _43(8); _OP[9] = _43(9); _OP[10] = _43(10); _OP[11] = _43(11); _OP[12] = _43(12); _OP[13] = _43(13); _OP[14] = _43(14); _OP[15] = _43(15); _OP[16] = _43(16); _OP[17] = _43(17); _OP[18] = _43(18); _OP[19] = _43(19); _OP[20] = _43(20); _OP[21] = _43(21); _OP[22] = _43(22); _OP[23] = _43(23); _OP[24] = _43(24); _OP.__rawCall__ = _43(25); _OP[26] = _43(26); _OP[27] = _43(27); _OP[28] = _43(28); _OP[29] = _43(29); _OP[30] = _43(30); _OP[31] = _43(31); _OP[32] = _43(32); _OP[33] = _44(33, 46); _OP[34] = _44(34, 47); _OP[35] = _44(35, 48); _OP[36] = _44(36, 49); _OP[37] = _44(37, 50); _OP[38] = _44(38, 51); _OP[39] = _44(39, 52); _OP[40] = _46(40, 53); _OP[41] = _44(41, 54); _OP[42] = _44(42, 55); _OP[43] = _44(43, 56); _OP[44] = _44(44, 57); _OP[45] = _44(45, 58); _OP[59] = _45(59, 33, 46); _OP[60] = _45(60, 34, 47); _OP[61] = _45(61, 35, 48); _OP[62] = _45(62, 36, 49); _OP[63] = _45(63, 37, 50); _OP[64] = _45(64, 38, 51); _OP[65] = _47(65, 40, 53); _OP[66] = _45(66, 41, 54); _OP[67] = _45(67, 42, 55); _OP[68] = _45(68, 43, 56); _OP[69] = _45(69, 44, 57); _OP[70] = _45(70, 45, 58); _OP[71] = _43(71); _OP[72] = _43(72); _OP[73] = _43(73); _OP[74] = _43(74); _OP[75] = _43(75); _OP[76] = _43(76); _OP[77] = _43(77); _OP[78] = _43(78); _OP[79] = _43(79); _OP[80] = _43(80); _OP[81] = _43(81); _OP[82] = _43(82); _2(); function repr(_54) if _25(_54) then return _OP[4](_54); else return _3.format('%s(%s)', _7, tostring(_54)); end; end; function hash(_54) if _25(_54) then return _OP[14](_54); else return (-1); end; end; function print(...) local _54 = {...}; local _55 = {}; local _56 = 1; for _57, _58 in pairs(_54) do if _25(_58) then _58 = str(_58); else _58 = repr(_58); end; _58 = LObj(_58); _55[_56] = _58; _56 = (_56 + 1); end; local _59 = table.concat(_55, ' '); _59 = _3.concat(_59, '\n'); _3.write(_59); end; function isinstance(_54, _55) _26(_54); local _56 = type(_54); local _57 = _56.__mro__; assert(type(_57) == tuple); if type(_55) == tuple then _55 = LObj(_55); else _55 = {_55}; end; for _58, _59 in pairs(_OP[82](_57)) do _26(_59); for _60, _61 in pairs(_55) do if _59 == _61 then return True; end; end; end; return False; end; function issubclass(_54, _55) _26(obj); if type(_54) ~= type then _29('issubclass() arg 1 must be a class'); end; local _56 = _54.__mro__; assert(type(_56) == tuple); if type(_55) == tuple then _55 = LObj(_55); else _55 = {_55}; end; for _57, _58 in pairs(_OP[82](_56)) do _26(_58); for _59, _60 in pairs(_55) do if _58 == _60 then return True; end; end; end; return False; end; function id(_54) if _25(_54) then return int(_13[_54].i); end; _39(_54, '__id!'); end; function dir(_54) return _OP[20](_54); end; function iter(_54) _54 = _OP[30](_54); if isinstance(_54, generator) == False then _29(TypeError('iter are only accept generator!')); end; return _54; end; function len(_54) return _OP[26](_54); end; _53 = nil; local function _54(_55) return tonumber(string.sub(tostring(_55), 8), 16); end; function _27(_55) if _3.type(_55) ~= 'table' then _39(_55, '__raw_id!'); end; local _56 = getmetatable(_55); if _56 == nil then local _57 = _54(_55); else setmetatable(_55, nil); _57 = _54(_55); setmetatable(_55, _56); end; return _57; end; object = nil; _0 = __build_lua_class__('object', {}); _0[2] = function(_55) end; function _0.__call(_55, ...) local _56 = {...}; return _OP.__rawCall__(_55, ...); end; function _0.__index(_55, _56) return _OP[17](_55, _56); end; function _0.__newindex(_55, _56, _57) return _OP[18](_55, _56, _57); end; function _0.__tostring(_55) return _3.format('%s(%s)', _6, LObj(repr(_55))); end; _0[1] = function(_55, ...) local _56 = {...}; local _57 = {}; _28(_57, _54(_57)); _3.setmetatable(_57, _55); _OP[2](_57, ...); return _57; end; _0[20] = function(_55) local _56 = getmetatable(_55); local _57 = {}; for _58, _59 in pairs(_55) do _57[_58] = true; end; for _58, _59 in pairs(_56) do _57[_58] = true; end; local _60 = {}; local _61 = 1; for _58, _59 in pairs(_57) do if not _19[_58] then _60[_61] = _58; _61 = (_61 + 1); end; end; _57 = nil; table.sort(_60); local _62 = {}; for _58, _59 in pairs(_60) do _62[_58] = str(_59); end; _60 = nil; return list(_62); end; _0[17] = function(_55, _56) local _57 = rawget(_55, _56); if _57 ~= nil then return _57; end; local _58 = getmetatable(_55); _57 = rawget(_58, _56); if _57 ~= nil then if _3.type(_57) == 'function' then return (function(...) return _57(_55, table.unpack({...})); end); else return _57; end; end; _29(_3.format("Not found '%s' attribute.", _56)); end; _0[18] = function(_55, _56, _57) local _58 = type(_55); if _16[_58] and _11 then local _59 = "can't set attributes of built-in/extension type "; _29(TypeError(_3.concat(_59, LObj(repr(_58.__name__))))); end; rawset(_55, _56, _57); end; _0[19] = function(_55, _56, _57) object[18](_55, _56, nil); end; _0[10] = function(_55, _56) return _55 == _56; end; _0[11] = function(_55, _56) return _55 ~= _56; end; _0[14] = function(_55, _56) return id(_55); end; _0[5] = function(_55) return _OP[4](_55); end; _0[4] = function(_55) local _56 = getmetatable(_55); local _57 = _56.__name__; local _58 = id(_55); _58 = _3.format('000000000%X', LObj(_58)); _58 = _3.string.sub(_58, (-_8)); return str(_3.format('', LObj(_57), _58)); end; _0[15] = function(_55) return True; end; _0 = _34(_0); object = _0; _2(); type = nil; _0 = __build_lua_class__('type', {object}); _0[17] = function(_55, _56) local _57 = _13[_55].c; if _57 ~= nil then local _58 = _57[_56]; if _58 ~= nil then return _58; end; end; return object[17](_55, _56); end; _0[25] = function(_55, ...) local _56 = {...}; return _55[1](_55, ...); end; _0[4] = function(_55) return str(_3.concat("")); end; function _0.mro(_55) return list(_13[_55.__mro__].v); end; _0 = _34(_0); type = _0; local _55 = nil; _0 = __build_lua_class__('ptype', {type}); _0[25] = function(_56, ...) local _57 = {...}; if _3.len(_57) == 1 then _26(_57[1]); return getmetatable(_57[1]); elseif _3.len(_57) == 3 then else _29('Unexcepted arguments.'); end; end; _0 = _34(_0); _0 = _36(_0); _55 = _0; setmetatable(object, type); setmetatable(type, _55); setmetatable(_55, _55); BaseException = nil; _0 = __build_lua_class__('BaseException', {object}); _0._56 = nil; _0[1] = function(_57, ...) local _58 = {...}; local _59 = tuple(_58); local _60 = object[1](_57); rawset(_60, 'args', _59); _OP[2](_60, _59); return _60; end; _0[5] = function(_57) local _58 = LObj(len(_57.args)); if _58 == 0 then return str(''); elseif _58 == 1 then return str(_OP[27](_57.args, int(0))); end; end; _0[4] = function(_57) local _58 = LObj(type(_57).__name__); return _3.concat(_58, repr(_57.args)); end; _0[82] = function(_57) local _58 = LObj(type(_57).__name__); local _59 = str(_57); if LObj(len(_59)) > 0 then return _3.concat(_58, ': ', LObj(_59)); else return _3.concat(_58); end; end; _0 = _35(_0); BaseException = _0; Exception = nil; _0 = __build_lua_class__('Exception', {BaseException}); _0 = _35(_0); Exception = _0; TypeError = nil; _0 = __build_lua_class__('TypeError', {Exception}); _0 = _35(_0); TypeError = _0; UnstableException = nil; _0 = __build_lua_class__('UnstableException', {Exception}); _0 = _35(_0); UnstableException = _0; KeyError = nil; _0 = __build_lua_class__('KeyError', {Exception}); _0 = _35(_0); KeyError = _0; local _56 = nil; _0 = __build_lua_class__('BuiltinConstType', {object}); _0[1] = function(_57, ...) local _58 = {...}; if not _11 then local _59 = object[1](_57, ...); _OP[2](_59, ...); return _59; end; return _57._get_singleton(); end; function _0._get_singleton(_57) _29('Not defined.'); end; _0 = _35(_0); _0 = _36(_0); _56 = _0; local _57 = nil; _0 = __build_lua_class__('NotImplementedType', {_56}); function _0._get_singleton(_58) return NotImplemented; end; _0[4] = function(_58) return str('NotImplemented'); end; _0 = _35(_0); _57 = _0; local _58 = nil; _0 = __build_lua_class__('EllipsisType', {_56}); function _0._get_singleton(_59) return Ellipsis; end; _0[4] = function(_59) return str('Ellipsis'); end; _0 = _35(_0); _58 = _0; local _59 = nil; _0 = __build_lua_class__('NoneType', {_56}); function _0._get_singleton(_60) return None; end; _0[4] = function(_60) return str('None'); end; _0[82] = function(_60) return nil; end; _0 = _35(_0); _59 = _0; local _60 = nil; _0 = __build_lua_class__('LuaObject', {object}); _0[2] = function(_61, _62) if _25(_62) then _29(Exception('Not allowed wrapping python object!')); end; assert(_62 ~= nil); _13[_61].v = _62; end; _0[5] = function(_61) return str(_OP[4](_61)); end; _0[4] = function(_61) return str(tostring(_13[_61].v)); end; _0[82] = function(_61) return _13[_61].v; end; _0 = _35(_0); _0 = _36(_0); _60 = _0; generator = nil; _0 = __build_lua_class__('generator', {_60}); _0[2] = function(_61, _62) if _25(_62) then _29(TypeError("cannot create 'generator' instances"), 1); elseif _3.type(_62) ~= 'thread' then _29(TypeError("gernerator only accept lua.type 'thread' object."), 1); end; _60[2](_61, _62); end; function _0.__next__(_61) return LObj(genbody)(); end; _0[4] = function(_61) return str(tostring(_13[_61].v)); end; _0[82] = function(_61) local _62 = _13[_61].v; local function _63() success, _5 = coroutine.resume(_62); if not success then return nil; end; return _5; end; return _63; end; _0[30] = function(_61) return _61; end; _0 = _35(_0); generator = _0; local function _61(_62) if _3.type(_62) ~= 'table' then elseif _3.len(_62) == 0 then return true; elseif _62[_3.len(_62)] == nil then elseif _62[1] == nil then elseif _62[0] ~= nil then else return true; end; _29(Exception('Not allowed unknown table (or other thing)!')); end; list = nil; _0 = __build_lua_class__('list', {_60}); _0[2] = function(_62, _63) local _64 = {}; local _65 = nil; local _66 = _64; for _67, _68 in pairs(_63) do _65 = {}; _65.v = _68; _65.p = _66; _66.n = _65; _66 = _65; end; if _64.n then _64.n.p = nil; end; if _65 and _65.p then _64.p = _65; end; _60[2](_62, _64); end; _0[27] = function(_62, _63) _63 = _OP[79](_63); _63 = LObj(_63); local _64 = _13[_62].v; assert(_63 >= 0); while _63 ~= 0 do _64 = _64.n; _63 = (_63 - 1); end; return _64.v; end; _0[4] = function(_62) local _63 = {}; local _64 = 1; local _65 = ''; _63[_64] = '['; _64 = (_64 + 1); local _66 = _13[_62].v.n; while _66 ~= nil do _63[_64] = _65; _64 = (_64 + 1); _63[_64] = LObj(repr(_66.v)); _64 = (_64 + 1); _65 = ', '; _66 = _66.n; end; _63[_64] = ']'; _64 = (_64 + 1); return table.concat(_63); end; _0[82] = function(_62) local _63 = {}; local _64 = 1; local _65 = _13[_62].v; while _65 ~= nil do _63[_64] = _65.v; _64 = (_64 + 1); _65 = _65.n; end; return _63; end; _0 = _35(_0); list = _0; tuple = nil; _0 = __build_lua_class__('tuple', {_60}); _0[2] = function(_62, _63) _60[2](_62, _63); assert(_61(_63)); end; _0[26] = function(_62) return int(_3.len(_13[_62].v)); end; _0[27] = function(_62, _63) _63 = _OP[79](_63); _63 = LObj(_63); assert(_63 >= 0); return _13[_62].v[(LObj(_63) + 1)]; end; _0[4] = function(_62) local _63 = _13[_62].v; local _64 = {}; local _65 = 1; local _66 = ''; _64[_65] = '('; _65 = (_65 + 1); for _67, _68 in pairs(_63) do _64[_65] = _66; _65 = (_65 + 1); _64[_65] = LObj(repr(_68)); _65 = (_65 + 1); _66 = ', '; end; if _3.len(_63) == 1 then _64[_65] = ','; _65 = (_65 + 1); end; _64[_65] = ')'; _65 = (_65 + 1); return table.concat(_64); end; _0[30] = function(_62) local _63 = _13[_62].v; local _64 = 1; local function _65() while _63[_64] ~= nil do _OP.__yield__(_63[_64]); _64 = (_64 + 1); end; end; _65 = _OP.__setupGenFunc__( _65); return _65(); end; _0 = _35(_0); tuple = _0; dict = nil; _0 = __build_lua_class__('dict', {_60}); _0[2] = function(_62, _63) _60[2](_62, {}); _13[_62].changed = false; _13[_62].length = 0; dict.update(_62, _63); end; function _0.update(_62, _63) for _64, _65 in pairs(_63) do _OP[28](_62, _64, _65); end; end; _0[28] = function(_62, _63, _64) assert(_26(_63, _64)); local _65 = _13[_62]; local _66 = _65.v; local _67 = LObj(_OP[14](_63)); if _66[_67] == nil then _65.changed = true; _65.length = (_65.length + 1); _66[_67] = {{_63, _64}}; return; end; local _68 = _66[_67]; for _69, _70 in pairs(_68) do if _OP[10](_63, _70[1]) == True then _70[1] = _63; _70[2] = _64; return; end; end; _65.changed = true; _65.length = (_65.length + 1); _68[(_3.len(_68) + 1)] = {_63, _64}; end; _0[27] = function(_62, _63) assert(_26(_63)); local _64 = _13[_62]; local _65 = _64.v; local _66 = LObj(_OP[14](_63)); if _65[_66] == nil then _29(KeyError(_63)); end; local _67 = _65[_66]; for _68, _69 in pairs(_67) do if _OP[10](_63, _69[1]) == True then return _69[2]; end; end; _29(KeyError(_63)); end; _0[82] = function(_62) end; _0[4] = function(_62) local _63 = _13[_62].v; local _64 = {}; local _65 = 1; local _66 = ''; _64[_65] = '{'; _65 = (_65 + 1); for _67, _68 in pairs(_63) do for _67, _69 in pairs(_68) do _64[_65] = _66; _65 = (_65 + 1); _64[_65] = LObj(repr(_69[1])); _65 = (_65 + 1); _64[_65] = ': '; _65 = (_65 + 1); _64[_65] = LObj(repr(_69[2])); _65 = (_65 + 1); _66 = ', '; end; end; _64[_65] = '}'; _65 = (_65 + 1); return table.concat(_64); end; _0 = _35(_0); dict = _0; str = nil; _0 = __build_lua_class__('str', {_60}); _0[2] = function(_62, _63) if _25(_63) then _63 = _OP[5](_63); _63 = LObj(_63); end; _13[_62].v = _63; end; _0[5] = function(_62) return _62; end; _0[4] = function(_62) return str(_3.concat("'", _13[_62].v, "'")); end; _0[26] = function(_62) return int(_3.len(_13[_62].v)); end; _0 = _35(_0); str = _0; local _62 = nil; _0 = __build_lua_class__('LuaNum', {_60}); _0[33] = function(_63, _64) return (_13[_63].v + _13[_64].v); end; _0[34] = function(_63, _64) return (_13[_63].v - _13[_64].v); end; _0[35] = function(_63, _64) return (_13[_63].v * _13[_64].v); end; _0[36] = function(_63, _64) return float((_13[_63].v / _13[_64].v)); end; _0[46] = function(_63, _64) return (_13[_64].v + _13[_63].v); end; _0[47] = function(_63, _64) return (_13[_64].v - _13[_63].v); end; _0[48] = function(_63, _64) return (_13[_64].v * _13[_63].v); end; _0[49] = function(_63, _64) return float((_13[_64].v / _13[_63].v)); end; _0[10] = function(_63, _64) return bool(_13[_63].v == _13[_64].v); end; _0[11] = function(_63, _64) return bool(_13[_63].v ~= _13[_64].v); end; _0 = _35(_0); _0 = _36(_0); _62 = _0; local function _63(_64) if isinstance(_64, int) == False then return NotImplemented; end; end; int = nil; _0 = __build_lua_class__('int', {_62}); _0[33] = function(_64, _65) return _63(_65) or int(_62[33](_64, _65)); end; _0[34] = function(_64, _65) return _63(_65) or int(_62[34](_64, _65)); end; _0[35] = function(_64, _65) return _63(_65) or int(_62[35](_64, _65)); end; _0[46] = function(_64, _65) return _63(_65) or int(_62[46](_64, _65)); end; _0[47] = function(_64, _65) return _63(_65) or int(_62[47](_64, _65)); end; _0[48] = function(_64, _65) return _63(_65) or int(_62[48](_64, _65)); end; _0[14] = function(_64) return int(_13[_64].v); end; _0[79] = function(_64) return int(_13[_64].v); end; _0 = _35(_0); int = _0; local _64 = 1; local _65 = 0; bool = nil; _0 = __build_lua_class__('bool', {int}); _0[2] = function(_66) end; _0[1] = function(_66, _67) if not _11 then local _68 = object[1](_66); if _67 == true then _67 = _64; elseif _67 == false then _67 = _65; end; _13[_68].v = _67; return _68; end; if _25(_67) then _67 = _OP[15](_67); else _67 = _67 and true or false; end; if _67 == true then return True; elseif _67 == false then return False; elseif _25(_67) and type(_67) == bool then return _67; end; _29('__Bool__ are returned unknown value.'); end; _0[15] = function(_66) return _66; end; _0[4] = function(_66) local _67 = _13[_66].v; if _67 == _64 then return str('True'); elseif _67 == _65 then return str('False'); end; end; _0[82] = function(_66) local _67 = _13[_66].v; if _67 == _64 then return true; elseif _67 == _65 then return false; end; end; _0 = _35(_0); bool = _0; local function _66(_67) if isinstance(_67, int) == True then return; elseif isinstance(_67, float) == True then return; else return NotImplemented; end; end; float = nil; _0 = __build_lua_class__('float', {_62}); _0[33] = function(_67, _68) return _66(_68) or float(_62[33](_67, _68)); end; _0[34] = function(_67, _68) return _66(_68) or float(_62[34](_67, _68)); end; _0[35] = function(_67, _68) return _66(_68) or float(_62[35](_67, _68)); end; _0[46] = function(_67, _68) return _66(_68) or float(_62[46](_67, _68)); end; _0[47] = function(_67, _68) return _66(_68) or float(_62[47](_67, _68)); end; _0[48] = function(_67, _68) return _66(_68) or float(_62[48](_67, _68)); end; _0 = _35(_0); float = _0; local function _67(_68, _69, _70, _71, ...) local _72 = {...}; return parse_func_kwargs(_68, _69, _70, _71, 0, None); end; local function _68(_69, _70, _71, _72, _73, _74, ...) local _75 = {...}; local _76 = {}; local _77 = 1; local _78 = _75; assert(isinstance(_69, tuple)); _69 = LObj(_69); _70 = LObj(_70); local _79 = (_71 + _73); local _80 = 0; if _69 ~= nil then local _81 = {}; local _82 = _3.length(_69); local _83 = _71; local _84 = (_82 - _83); while _80 > 0 do _81[_77] = _69[_77]; _77 = (_77 + 1); _80 = (_80 - 1); end; end; if _70 ~= nil then end; end; function _67(_69, _70, ...) local _71 = {...}; end; local function _69() for _70, _71 in pairs(_17) do _37(_70); _16[_70] = true; end; _17 = nil; _G['NotImplemented'] = _57(); _G['Ellipsis'] = _58(); _G['None'] = _59(); _G['True'] = bool(true); _G['False'] = bool(false); return true; end; _11 = _69(); assert(_11); _2(); local _70 = 0; local _71 = dict({[int(1)] = int(2), [int(3)] = int(4), [int(1)] = int(3)}); _2(); print('!', _OP[27](_71, int(3))); _2(); print(a, b, _70); _2(); print(_3.format('%s', 'test')); _2(); print(_OP[36](int(3), int(6))); _2(); print(int.mro()); _2(); print(dir(object())); _2(); print('?', LObj(bool.__bases__)); _2(); print(_OP[33](True, True)); _2(); if computer then print('Python3 By EcmaXp :P'); local _72 = {}; local _73 = setmetatable(_G, {['__index'] = _ENV}); while term.isAvailable() do local _74 = component.gpu.setForeground(65280); term.write('lua> '); component.gpu.setForeground(_74); local _75 = term.read(_72); if _75 == nil then return; end; while _3.len(_72) > 10 do table.remove(_72, 1); end; statement, result = load(_75, '=stdin', 't', _73); local _76 = load(_3.concat('return ', _75), '=stdin', 't', _73); local _77 = _76 or statement; if _77 then local _78 = table.pack(pcall(_77)); end; if not _78[1] or _78.n > 1 then print(table.unpack(_78, 2, _78.n)); else print(_78); end; end; end;