What are assignment expressions (using the “walrus” or “:=” operator)? Why was this syntax added?

PEP 572 contains many of the details, especially for the first question. I’ll try to summarise/quote concisely arguably some of the most important parts of the PEP: Rationale Allowing this form of assignment within comprehensions, such as list comprehensions, and lambda functions where traditional assignments are forbidden. This can also facilitate interactive debugging without the … Read more

Install Python 3.8 kernel in Google Colaboratory

I have found how to run Python 3.8 notebook on Colab. install Anaconda3 add (fake) google.colab library start jupyterlab access it with ngrok Here’s the code # install Anaconda3 !wget -qO ac.sh https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh !bash ./ac.sh -b # a fake google.colab library !ln -s /usr/local/lib/python3.7/dist-packages/google \ /root/anaconda3/lib/python3.8/site-packages/google # start jupyterlab, which now has Python3 = 3.8 … Read more

PyWin32 and Python 3.8.0

Spoiler alert!!! Applied #2.2. (from below) to the original .whls, and published them on [GitHub]: CristiFati/Prebuilt-Binaries – (master) Prebuilt-Binaries/PyWin32/v225 (win_amd64, win32 for Python 3.8). After installing (one of) them, existing code should work OOTB (with respect to this issue). Install steps: Download the .whl that matches your Python architecture (64bit, 32bit – for more details … Read more

“:=” syntax and assignment expressions: what and why?

PEP 572 contains many of the details, especially for the first question. I’ll try to summarise/quote concisely arguably some of the most important parts of the PEP: Rationale Allowing this form of assignment within comprehensions, such as list comprehensions, and lambda functions where traditional assignments are forbidden. This can also facilitate interactive debugging without the … Read more