New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Walrus operator support #11618
Comments
Damn, I didn't try that. If your playing with 3.8 alpha, I'm going to assume you likely have enough skills to dig into this and find what the values of I'm not sure I'll have time to install 3.8 and try to track that down myself. |
Hi @Carreau , I didn't know how to serialize the
I'll see if I can find some time this week to understand the problem (I'm not familiar with |
I also encountered this problem on IPython with Python 3.8.0a2. Seems like there is an issue with built-in
|
Reported upstream: https://bugs.python.org/issue36332 |
The upstream issue was fixed and the fix is available with Python 3.8 alpha 3. Verified the same on master. I think this can be closed. (foo-venv) ⋊> ~/cpython on master ⨯ ipython 18:59:03
Python 3.8.0a3+ (heads/master:2ea8099523, Apr 6 2019, 18:56:04)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: items = [{'name': 'foo'}, {}]
In [2]: for item in items:
...: if name := item.get('name'):
...: print(name)
...:
foo |
Closing as fixed upstream; thanks for taking care off the report and followup. |
Hi there, You seem to run IPython on Python 3.8; do you mind trying #11713 that tried to make use of the new 3.8b1 (not out yet) top-level await ? |
I wanted to try out the new assignment expressions aka walrus operator in Python 3.8.
It all worked fine in plain Python 3.8:
But failed miserably in IPython:
I was surpised to see that happen, as IPython 7.3.0+ should have Python 3.8 support.
The text was updated successfully, but these errors were encountered: