[Python-ideas] Is there a good reason to use * for multiplication?
Joshua Landau
joshua.landau.ws at gmail.com
Sat Oct 13 21:14:09 CEST 2012
On 13 October 2012 19:29, Sturla Molden <sturla at molden.no> wrote:
> Den 13. okt. 2012 kl. 06:44 skrev Devin Jeanpierre <jeanpierreda at gmail.com
> >:
>
> >
> > Python has cleverly left the $ symbol unused.
> >
> > We can use it as a quasiquote to embed executable TeX.
> >
> > for x in xrange($b \cdot \sum_{i=1}^n \frac{x^n}{n!}$):
> > ...
> >
> > No need to wait for that new language, we can have a rich set of math
> > operators today!
> >
>
>
> LOL :D
>
> But hey, this is valid Python :D :D
>
> for x in texrange(r"$b \cdot \sum_{i=1}^n \frac{x^n}{n!}$"): pass
I am glad someone else shares the same progressive attitude. I, personally,
wrap my whole code like so:
import texcode
texcode.texecute("""
> \eq{y}{\range{1}{10}}
> \for{x}{y}{
> \print{x}
> }
> """) # Alas, the joy has to end
Which has tremendously improved the quality of my output.
Recently, rendering my code, too, has sped up to a remarkable 3
pages-per-minute!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121013/9ac2da7a/attachment.html>
More information about the Python-ideas
mailing list