On Fri, Sep 23, 2016 at 12:18 AM Chris Angelico <ros...@gmail.com> wrote:

> # Recursion in functions
> def spam():
>     return spam()
>

I just note that it *is* surprising, for most users, that you can't be sure
that this is a recursion, yet. So it if you want a trusted-upon recursion
you should write

# spam:
def spam():
    def spam():
        return spam()
    return spam()


Elazar
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to