Pythonã¯æå¼·ã§ãããææ³ã¯ãã§ã¼ç°¡åãã©ã¤ãã©ãªãå å®åº¦ãããããããã§ãã¦ã¡ã¿ããã°ã©ãã³ã°ãã§ããããã®ã¡ã¿ããã°ã©ãã³ã°ã使ãã¨æ«å°¾å帰æé©åã¾ã§ã§ããããã§ãâ¦ãããããNew Tail Recursion Decorator « Python recipes « ActiveState Code class tail_recursive(object): def __init__(self, func): self.func = func self.firstcall = True self.CONTINUE = object() def __call__(self, *args, **kwd): if self.firstcall: func = self.func CONTINUE = self.CONTINUE self.firstcall = False try:
{{#tags}}- {{label}}
{{/tags}}