Changes between Initial Version and Version 4 of Ticket #28966


Ignore:
Timestamp:
08/09/20 16:18:52 (6 months ago)
Author:
mkoeppe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28966

    • Property Cc gh-mwageringel added
    • Property Authors changed from to Matthias Koeppe
    • Property Dependencies changed from to #30106
    • Property Milestone changed from sage-9.1 to sage-9.2
  • Ticket #28966 – Description

    initial v4  
    11This is something that's been discussed before but I don't think there's a ticket for it.
    22
    3 Python 3 allows most unicode symbols (except some digit characters, whitespace and other oddities) to be used in identifiers, so we can easily provide unicode aliases for some common built-ins, e.g.
     3Python 3 allows unicode word-constituent characters to be used in identifiers, https://docs.python.org/3/reference/lexical_analysis.html#identifiers, subject to NFKC normalization.  So we can easily provide unicode aliases for some common functions and constants named and denoted by Greek letters.
    44
    5 {{{
    6 π = pi
    7 ℯ = e
    8 𝒾 = I
    9 ℤ = ZZ
    10 ℚ = QQ
    11 }}}
    12 etc.  One can have fun with it.
    13 
    14 In Python 3 it is also possible to do tab-completion for many unicode characters: https://ipython.readthedocs.io/en/stable/api/generated/IPython.core.completer.html#latex-and-unicode-completion
     5In Python 3 / IPython it is also possible to do tab-completion for many unicode characters: https://ipython.readthedocs.io/en/stable/api/generated/IPython.core.completer.html#latex-and-unicode-completion
     6(This list can easily be expanded by modifying the dict in `IPython.completer.latex_symbols`.)
    157
    168This enables nice-looking code like:
    17 
    189{{{
    1910sage: sin(π)
     
    2314}}}
    2415
    25 There were some things I found lacking, but this list can easily be expanded by modifying the dict in `IPython.completer.latex_symbols`.