Pythonã®ã¤ãã¬ã¼ã¿(iterator)ã¨ã¸ã§ãã¬ã¼ã¿(generator)ã«ã¤ãã¦ã¾ã¨ãã¦ã¿ã¾ãã (追è¨2018.12.25: Python3ã®ææ³ã«å
¨é¢çã«ç½®ãæãã¾ãã) ã¤ãã¬ã¼ã¿: è¦ç´ ãå復ãã¦åãåºããã¨ã®ã§ããã¤ã³ã¿ãã§ã¼ã¹ ã¸ã§ãã¬ã¼ã¿: ã¤ãã¬ã¼ã¿ã®ä¸ç¨®ã§ããã1è¦ç´ ãåãåºããã¨ãã度ã«å¦çãè¡ããè¦ç´ ãã¸ã§ãã¬ã¼ãããã¿ã¤ãã®ãã®ãPythonã§ã¯yieldæã使ã£ãå®è£
ãæããã¨ãå¤ãã¨æããã Pythonçµã¿è¾¼ã¿ã®ã³ã¬ã¯ã·ã§ã³(list, tuple, set, dictãªã©)ã¯ã©ããã¤ãã¬ã¼ã·ã§ã³å¯è½ã§ãããçµã¿è¾¼ã¿ã®ã³ã¬ã¯ã·ã§ã³ã使ã£ãç¹°ãè¿ãå¦çã§ã¯ãããããã³ã¬ã¯ã·ã§ã³ã«å¤ãå
¥ãã¦ããå¿
è¦ãããããã以ä¸ã®ãããªã±ã¼ã¹ã§ã¯ã¤ãã¬ã¼ã¿ãã¸ã§ãã¬ã¼ã¿ãèªåã§å®è£
ãããã¨ããã±ã¼ã¹ãããã¨æãã¾ãã ç¡éã«ç¹°ãè¿ãã¤ãã¬ã¼ã·ã§ã³ è¦ç´ ãã¹ã¦ãããããã
{{#tags}}- {{label}}
{{/tags}}