[Python-ideas] Settable defaulting to decimal instead of float

אלעזר elazarg at gmail.com
Thu Jan 12 06:59:33 EST 2017


I think such proposals are special cases of a general theme: a compiler
pragma, similar to "from __future__", to make Python support
domain-specific syntax in the current file. Whether it's decimal literals
or matrix/vector literals etc.

I think it will be nice to make some tool, external to Python, that will
allow defining such "sibling languages" (transpiled into Python) easily and
uniformly.

Elazar

בתאריך יום ה׳, 12 בינו' 2017, 13:21, מאת Paul Moore ‏<p.f.moore at gmail.com>:

> On 12 January 2017 at 10:28, Victor Stinner <victor.stinner at gmail.com>
> wrote:
> > George requested this feature on the bug tracker:
> > http://bugs.python.org/issue29223
> >
> > George was asked to start a discusson on this list. I posted the
> > following comment before closing the issue:
> >
> > You are not the first one to propose the idea.
>
> OK, but without additional detail (for example, how would the proposed
> flag work, if the main module imports module A, then would float
> literals in A be decimal or binary? Both could be what the user wants)
> it's hard to comment. And as you say, most of this has been discussed
> before, so I'd like to see references back to the previous discussions
> in any proposal, with explanations of how the new proposal addresses
> the objections raised previously.
>
> Paul
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170112/a580feaf/attachment.html>


More information about the Python-ideas mailing list