[Python-ideas] Null coalescing operator

Alexander Belopolsky alexander.belopolsky at gmail.com
Sat Sep 10 17:05:55 EDT 2016


On Sat, Sep 10, 2016 at 4:56 PM, Guido van Rossum <guido at python.org> wrote:

> Another issue already discussed in PEP 505 is a conflict with IPython
> (Jupyter Notebook), which uses ? and ?? as custom syntax to request
> help. But maybe it can be taught to only recognize those when they're
> the last character(s) on the line?
>

I think this is already the case:

In [1]: ?foo
Object `foo` not found.

In [2]: foo?
Object `foo` not found.

In [3]: foo?bar
  File "<ipython-input-3-c7de2a05ce6b>", line 1
    foo?bar
       ^
SyntaxError: invalid syntax
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160910/57e04d5d/attachment-0001.html>


More information about the Python-ideas mailing list