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

Python 3 is barely different in my experience and it's been about 10 years at this point.

I do enjoy some of the "new" features of python 3.



I used `async` as the name of a function decorator in some Python3.4 code, which then broke in 3.6 which introduced `async` as a keyword.


What was the level of effort to remediate that?


Probably around 4-6 hours of work all told.

We had to come up with a new name, do a find/replace, review the changes, test, fix a couple of issues because the replace wasn't perfect/complete, update the dev documentation, make a new patch release, and then create packages for the various supported platforms. Oh and looking back over it now, the filename had to be changed too, because apparently you can't use a keyword as a module name in Python either. So where the documentation linked directly to that file, that had to be updated as well.

[1] https://github.com/saulpw/visidata/issues/164

[2] https://github.com/saulpw/visidata/releases/tag/v1.2.1


sed 's/async/whatever' ...


Some of the syntax changes are barely different (print statement a function instead of a keyword, good) but a lot of new things are added that I would consider to be syntactic sugar (walrus operator, for example) that threaten to detract from the two biggest things that drew me to Python: clean syntax and obvious understandability.


Python allows imperative code with side effects in imported modules, as well as the "else" statement for "for" loops, so Python has never guaranteed obvious understandability.


Sure there are plenty of things that aren't perfect in Python, but I think it was the best of all viable candidates that came closest to that goal.


Not very different, but fallout from the Unicode switch is quite a headache.

I generally run with LANG=C, and run into Python3 issues regularly as a result.

Also, if you have to support 'async' code that someone wrote, that could be a heavy load as well.




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

Search: