å¼ç§°: ã¤ã³ã¹ãã¯ã·ã§ã³æ©è½ã®è§¦ã ç®ç: inspect ã¢ã¸ã¥ã¼ã«ã®ä½¿ç¨æ¹æ³ãå¦ã¶ ç¹å¾´: ãã°åºåæã« pprint ã¢ã¸ã¥ã¼ã«ã使ãã¨æ´å½¢ããã¦è¦æã ç¨ä¾: å®è¡ä¸ã®ã½ã¼ã¹ã®è¡çªå·ãåºåããããããã° åè: inspect ã¢ã¸ã¥ã¼ã«ã¯ãã£ã¨å¥¥ãæ·±ãã Python ã§å®è¡ä¸ã®ã½ã¼ã¹ã®è¡çªå·ãåºåããä»çµã¿(C è¨èªã§ãã __LINE__ ãã¯ãããããã©ãã)ã調ã¹ã¦ã¿ãããå¹¾ã¤ãã®æ¹æ³ãåããã¾ãããsys._getframe ã使ãæ¹æ³ãããã¾ãããããã§ã¯ inspect ã¢ã¸ã¥ã¼ã«ã®ä½¿ç¨æ¹æ³ãç´¹ä»ãã¾ãã ã·ã³ãã«ãªæ¹æ³ã§ã¯ã以ä¸ã§ç¾å¨è¡ãåå¾ã§ãã¾ãã inspect.currentframe().f_lineno ããå ±éé¢æ°ã§ãã©ãããå¼ã³åºããããç¥ãããå ´åã以ä¸ã§å¼ã³åºãå ã®è¡çªå·ãåå¾ã§ãã¾ãã inspect.currentframe().f_bac
{{#tags}}- {{label}}
{{/tags}}