Who wrote Py_UNREACHABLE?

Barry Scott barry at barrys-emacs.org
Sun Jan 2 12:06:34 EST 2022



> On 2 Jan 2022, at 16:17, Marco Sulla <Marco.Sulla.Python at gmail.com> wrote:
> 
> #if defined(RANDALL_WAS_HERE)
> #  define Py_UNREACHABLE() \
>    Py_FatalError( \
>        "If you're seeing this, the code is in what I thought was\n" \
>        "an unreachable state.\n\n" \
>        "I could give you advice for what to do, but honestly, why\n" \
>        "should you trust me?  I clearly screwed this up.  I'm writing\n" \
>        "a message that should never appear, yet I know it will\n" \
>        "probably appear someday.\n\n" \
>        "On a deep level, I know I'm not up to this task.\n" \
>        "I'm so sorry.\n" \
>        "https://xkcd.com/2200")
> #elif defined(Py_DEBUG)
> #  define Py_UNREACHABLE() \
>    Py_FatalError( \
>        "We've reached an unreachable state. Anything is possible.\n" \
>        "The limits were in our heads all along. Follow your dreams.\n" \
>        "https://xkcd.com/2200")

use git blame to find out the commit then use git log to read the commit message.

Barry


> 
> etc
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 



More information about the Python-list mailing list