[Python-ideas] Re: Addition of a "plus-minus" binary numeric operator

2021-09-14 Thread Ir. Robert Vanden Eynde
Add you can call this function plusminus Then use the funcoperators module to write : upper, lower = a +plusminus- b pip install funcoperators Le mar. 14 sept. 2021 à 16:02, Paul Moore a écrit : > I doubt it, it seems way too specialised to be worth making into a > language feature. > > If

[Python-ideas] Re: symbolic math in Python

2021-05-19 Thread Ir. Robert Vanden Eynde
> solve(x**2 == 1/2) pip install funcoperators >>> solve(x ** 2 |Equals| 1/2) <<< Equals = infix(Eq) <<< from sympy import Eq Le mer. 19 mai 2021 à 08:40, Martin Teichmann a écrit : > Hi list, > > as you might have noticed, I am trying to improve the syntax and semantics > for symbolic math

[Python-ideas] Re: symbolic math in Python

2021-05-19 Thread Ir. Robert Vanden Eynde
SUB Hello everyone, what is the usual way to "like" a mail in the maillist and subscribing to the thread ? By sending a message it adds me to the "Participants" in the webapp which is neat (I can then search for my messages) I could do it in the webapp but not everybody will see it Le mer. 19

[Python-ideas] Re: Add a mechanism so that multiple exceptions can be caught using `except E1, E2, E3:`

2021-05-18 Thread Ir. Robert Vanden Eynde
Static analysis and factorisation, I sub ! :D Le mar. 11 mai 2021 à 01:47, Rob Cliffe via Python-ideas < python-ideas@python.org> a écrit : > > > On 10/05/2021 12:43, Chris Angelico wrote: > > On Mon, May 10, 2021 at 9:36 PM Steven D'Aprano > wrote: > >> On Mon, May 10, 2021 at 10:04:58AM

[Python-ideas] Re: division of integers should result in fractions not floats

2021-05-18 Thread Ir. Robert Vanden Eynde
There it is : https://mail.python.org/archives/list/python-ideas@python.org/message/B4EPUQA3GCAXYWB6YMMNAJPMWP5L3QUH/ Le mar. 18 mai 2021 à 12:43, Ir. Robert Vanden Eynde a écrit : > This thread seems related to the other thread I just answered I don't > find, I wrote "julia&q

[Python-ideas] Re: division of integers should result in fractions not floats

2021-05-18 Thread Ir. Robert Vanden Eynde
This thread seems related to the other thread I just answered I don't find, I wrote "julia" there, hmmm Le mar. 18 mai 2021 à 12:41, Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> a écrit : > David Mertz writes: > > On Fri, May 14, 2021, 4:31 PM Jonathan Fine > wrote: > > > > >

[Python-ideas] Re: Python 3.10: ranges in pattern matching

2021-05-18 Thread Ir. Robert Vanden Eynde
Scala also has "match" cases that are Class redefinable, used for regex for example About integers ranges, we already have the master class : builtins.range pip install funcoperators deals with the issue like this : for i in 1 /irange/ 5: print(i) # will print 1 2 3 4 5 Where irange =

[Python-ideas] Re: Fractions vs. floats - let's have the cake and eat it

2021-05-18 Thread Ir. Robert Vanden Eynde
Julia has these kind of builtin things. The main problem is backward compatibility. However your tool is useful as a python-to-python parser (from the) (I remember some static analysis tools like "mpy"?) pip install funcoperators solve the problem