Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The commit is more interesting than the article: 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.


That 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:


90% of it is print statement -> function. I got pretty tired of scrolling past all that to try and find the interesting bits.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: