4 ms·
The commit is more interesting than the article: https://github.com/sympy/sympy/pull/2318 https://github.com/sympy/sympy/pull/2318 It does fail to mention that
by shadowmint 13y ago
The commit is more interesting than the article:
https://github.com/sympy/sympy/pull/2318 https://github.com/sympy/sympy/pull/2318
It does fail to mention that you need to also use special exception handling in all cases, eg.
try:
...
except TypeError:
e = exception()
...
...but it hits all the other things, except the obvious, make sure your tests are running continuously using py2, py3 and pypy, otherwise you'll just frustrate yourself as you're coding.
- YellowRex 13y ago90% of it is print statement -> function. I got pretty tired of scrolling past all that to try and find the interesting bits.
- takluyver 13y agoThat exception handling is only necessary if you need to support 2.5 or older. A lot of projects now are just supporting 2.6 and newer, in which case you can use the Python 3 syntax: except TypeError as e: