2. ç§ã«ã¤ã㦠â¢â¯ @kzfm â⯠製è¬ä¼ç¤¾ã®ç 究å¡(æè¿ã¤ã³ãã©å¨ãã°ãã) â⯠perl -> python (-> haskell) â¢â¯ pypiã§ã¡ã³ã â⯠pygamess(éååå¦è¨ç®) â⯠pychembldb(sqlalchemy製ã®dbapi) â¢â¯ æè¿pandas(Rã¿ããã«ä½¿ãããã¤)ããæ° ã«å ¥ã
å¼ç§°: ã¤ã³ã¹ãã¯ã·ã§ã³æ©è½ã®è§¦ã ç®ç: inspect ã¢ã¸ã¥ã¼ã«ã®ä½¿ç¨æ¹æ³ãå¦ã¶ ç¹å¾´: ãã°åºåæã« pprint ã¢ã¸ã¥ã¼ã«ã使ãã¨æ´å½¢ããã¦è¦æã ç¨ä¾: å®è¡ä¸ã®ã½ã¼ã¹ã®è¡çªå·ãåºåããããããã° åè: inspect ã¢ã¸ã¥ã¼ã«ã¯ãã£ã¨å¥¥ãæ·±ãã Python ã§å®è¡ä¸ã®ã½ã¼ã¹ã®è¡çªå·ãåºåããä»çµã¿(C è¨èªã§ãã __LINE__ ãã¯ãããããã©ãã)ã調ã¹ã¦ã¿ãããå¹¾ã¤ãã®æ¹æ³ãåããã¾ãããsys._getframe ã使ãæ¹æ³ãããã¾ãããããã§ã¯ inspect ã¢ã¸ã¥ã¼ã«ã®ä½¿ç¨æ¹æ³ãç´¹ä»ãã¾ãã ã·ã³ãã«ãªæ¹æ³ã§ã¯ã以ä¸ã§ç¾å¨è¡ãåå¾ã§ãã¾ãã inspect.currentframe().f_lineno ããå ±éé¢æ°ã§ãã©ãããå¼ã³åºããããç¥ãããå ´åã以ä¸ã§å¼ã³åºãå ã®è¡çªå·ãåå¾ã§ãã¾ãã inspect.currentframe().f_bac
ã¿ããªã®IoT/ã¿ããªã®Pythonã®èè ãäºåçè¿ã160平米ã®åºä»ãä¸æ¸å»ºã¦ã«å«/æ¯å/å¨/ãããã¨æ®ããã¦ã¾ããæé1000ä¸PV/150ä¸UUã®Webãµã¼ãã¹éå¶ä¸ã å 責äºé ãã©ã¤ãã·ã¼ããªã·ã¼ deliciousã«see()ã¨ããã®ãä¸ãã£ã¦ããã®ã§æ©éãããã¦ã¿ãã see()ã¨ããã®ã¯ï¼ç°¡åã«è¨ãã¨dir()ãã便å©ã§æ°ã®å©ãããªãã¸ã§ã¯ãã¤ã³ã¹ãã¯ã¿ã ããªãã¸ã§ã¯ãã«ã©ããªã¡ã½ãããã¢ããªãã¥ã¼ããããã®ããç°¡åã«èª¿ã¹ããã¨ãåºæ¥ãã³ãã³ãã©ã¤ã¯ãªé¢æ°ã ãã¨ãã°Pythonã®æååãsee()ã«ä¸ãã¦ã¿ãã¨ãããªãã In [1]:see('') Out[1]: [] in + * % < <= == != > >= hash() help() len() repr() str() .capitalize() .center() .count() .decode()
ç®æ¬¡ dis/inspect ã¢ã¸ã¥ã¼ã«ã¨ ceval.c ã使ã£ã Python ã®ãããã³ã° dis ã¢ã¸ã¥ã¼ã«ã¨ python interpreter é¢æ°ã«å±ãã func_code ãªãã¸ã§ã¯ãã¨co_varnames, co_names, co_consts å±æ§ python interpreter ceval.c:Python Virtual Machine ã® C ã½ã¼ã¹ã»ã³ã¼ã inspect ã¢ã¸ã¥ã¼ã« dis, inspect ã使ã£ãä¸è¡ã³ã¼ã python ã³ã¼ãã® hack x,y = y,x, x,z,y = z,y,x Python ãªãã¸ã§ã¯ã é¢æ° STORE_GLOBAL/STORE_NAME inspect çµç±ã«ãã ã¯ã©ã¹ã® disassemble LOAD_ATTRI ãªã¹ã hash generator thread decorator æ§
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}