Re: [Python-ideas] Spelling of Assignment Expressions PEP 572 (was post #4)

Also 2 or 3. The 3rd one is in the order of natural language, just like: while get then next item and assign it to `item`, if it's not None, do some stuff. However just as we have pointed out, the semantics of '->' is quite different from the cases it's currently used at, so it should be handled much more carefully. I think maybe we can use unicode characters like ≜ (\triangleq) and add the support of unicode completion to python repl. The unicode completion of editors or ides has been quite mature.

On Sun, Apr 15, 2018 at 11:11:37PM +0800, Thautwarm Zhao wrote:
What key combination do I need to type to get ≜ in the following editors please? I tried typing \triangleq but all I got was \triangleq. Notepad (Windows) Brackets (Mac) BBEdit (Mac) kwrite (Linux) kate nano geany gedit as well as IDLE, my mail client (kmail, Thunderbird or mutt), my web browsers (Firefox, Opera and Chromium), the interactive interpreter in various different consoles, my Usenet client (Pan and KNode) and IRC (pidgin). Oh, having it work in LibreOffice and GoogleApps too would be nice, although not essential since I don't often write code in them. And what decent fonts do I need to install for ≜ to show up as something other than a square box ("missing glyph")? -- Steve

On Sun, Apr 15, 2018 at 7:15 PM, Steven D'Aprano <steve@pearwood.info> wrote:
Typing should not be a problem generally. There are a lot of 3d-party apps which can bind a key to specific char input, system-wide. On windows I use Autohotkey. But no 100% guarantee of course for any editor.
And what decent fonts do I need to install for ≜ to show up as something other than a square box ("missing glyph")?
Well, here it is way less optimistic :) The chances to see that "delta equal to" sign in some random font / random app is not so big. It's only if you have fonts fallback system setup, and by default on my windows it seems to work only in Firefox browser. Mikhail

Steven D'Aprano writes:
What key combination do I need to type to get ≜ in the following editors please? I tried typing \triangleq but all I got was \triangleq.
Your implied point is correct IMO, but all of the editors and applications mentioned that I've used are perfectly happy with any characters delivered by the OS. So your question should be "what key combination do I use ... in the following OSes and/or GUIs:" (I don't have a list). Ditto fonts (MS fonts tend to work crappily on Mac in my experience, at least in Word and Excel). I note that currently there is heated debate on the Fedora lists about distributing the base OS with decent East Asian font support, and I think the majority are *opposed* (on the grounds that the size increase is noticable). I've also noticed that the recommended fonts on Linux seem to have been in flux for decades, and even differ across distros much of the time. Either way, teaching how to augment your OS is not the business of Python, so we should stick to a reasonable approximation to the least advanced environment, which is (TA-DA!) that of the U.S.

On Sun, Apr 15, 2018 at 11:11:37PM +0800, Thautwarm Zhao wrote:
What key combination do I need to type to get ≜ in the following editors please? I tried typing \triangleq but all I got was \triangleq. Notepad (Windows) Brackets (Mac) BBEdit (Mac) kwrite (Linux) kate nano geany gedit as well as IDLE, my mail client (kmail, Thunderbird or mutt), my web browsers (Firefox, Opera and Chromium), the interactive interpreter in various different consoles, my Usenet client (Pan and KNode) and IRC (pidgin). Oh, having it work in LibreOffice and GoogleApps too would be nice, although not essential since I don't often write code in them. And what decent fonts do I need to install for ≜ to show up as something other than a square box ("missing glyph")? -- Steve

On Sun, Apr 15, 2018 at 7:15 PM, Steven D'Aprano <steve@pearwood.info> wrote:
Typing should not be a problem generally. There are a lot of 3d-party apps which can bind a key to specific char input, system-wide. On windows I use Autohotkey. But no 100% guarantee of course for any editor.
And what decent fonts do I need to install for ≜ to show up as something other than a square box ("missing glyph")?
Well, here it is way less optimistic :) The chances to see that "delta equal to" sign in some random font / random app is not so big. It's only if you have fonts fallback system setup, and by default on my windows it seems to work only in Firefox browser. Mikhail

Steven D'Aprano writes:
What key combination do I need to type to get ≜ in the following editors please? I tried typing \triangleq but all I got was \triangleq.
Your implied point is correct IMO, but all of the editors and applications mentioned that I've used are perfectly happy with any characters delivered by the OS. So your question should be "what key combination do I use ... in the following OSes and/or GUIs:" (I don't have a list). Ditto fonts (MS fonts tend to work crappily on Mac in my experience, at least in Word and Excel). I note that currently there is heated debate on the Fedora lists about distributing the base OS with decent East Asian font support, and I think the majority are *opposed* (on the grounds that the size increase is noticable). I've also noticed that the recommended fonts on Linux seem to have been in flux for decades, and even differ across distros much of the time. Either way, teaching how to augment your OS is not the business of Python, so we should stick to a reasonable approximation to the least advanced environment, which is (TA-DA!) that of the U.S.
participants (4)
-
Mikhail V
-
Stephen J. Turnbull
-
Steven D'Aprano
-
Thautwarm Zhao