#15403·ipython

Interaction with PEP 823 and 824

Author: cdce8pCreated Sep 23, 2026Updated Sep 23, 2026

Hello everyone,

I'm the author of PEP 823 (None-aware access operators) and 824 (None-coalescing operators). Together they would add the following operators to the language ?., ?[ ], ?? and ??=. It was brought to my attention that IPython uses ? to access help on an object. https://ipython.readthedocs.io/en/stable/interactive/python-ipython-diff.html#accessing-help

Based on a quick search, it looks like you're using a regex to detect it. https://github.com/ipython/ipython/blob/93dde62b5b76275dbd1a1cfda328969fa59caa08/IPython/core/inputtransformer2.py#L580-L588

I'd be interested to know if the PEP proposals would break that use case or if you'd be able to work around it. My initial thought would be that as long as no line break isn't inserted in a bad spot, it should continue to work if ? is only detected directly at the start and end of a line.

Edit: While for ?. and ?[ ] it will depend if the line break is placed between the characters, ?? might be more difficult. As a conditional operator similar to and and or, it will be at the beginning or end in multiline expressions (depending on the specific formatting).

The discussion threads with more details

In particular the issue with IPython was raised in this post: https://discuss.python.org/t/pep-823-none-aware-access-operators/109159/5.

Thanks for your time!