[Python-ideas] float('∞')=float('inf')

Stephen J. Turnbull stephen at xemacs.org
Sun Jul 14 16:06:03 CEST 2013


Joshua Landau writes:

 > How do you input unicode then?

I don't.  He probably doesn't, either.  On Mac OS, there's a generic
way to input characters you only know by sight: a clickable table.
Kinda painful, but then, that works for functions in Excel so 99% of
the computer-using world can handle it, I suppose.  However, in
general I don't input Unicode, I input characters I know.  I bet
Steven does too.

On touchpads, I write them by hand (takes memorizing pseudo-random
sequences, though, because Chinese characters are recognized
dynamically by the shape of strokes, and order matters, not by the
shape of the resulting glyph).  ATK, I use phonetic input.  For math
characters, at least Emacs provides "LaTeX entry".  Ie, if you type
"\pi" you get the Greek letter, if you type "\int" you get an integral
sign character.  To get the leminscate, you type "\infty".  If you
know the Unicode name of the character you can use that for input in
Python and Emacs.  Emacs is pretty smart about completion: I don't use
that feature but it would be easily arranged that completion work on
the list of Unicode names, if it doesn't work already.  (Of limited
utility for Han characters though because the Unicode code point is
the significant part of the name for them.)

 > > future they may have to memorize a key sequence like option-p to get π, or
 > > option-u o to get ö. (See, I still remember them, 15+ years since I last
 > > used a Mac extensively. Well-thought out mnemonic key sequences for the
 > > win.)

Not for Han characters or Hangul or Hieroglyphics though.  Phonetic
input is the way to go for those.

Siri actually works pretty good for spoken input, too.



More information about the Python-ideas mailing list