3 ms·
I'm a PHP guy (started in the PHP3 days) and a few weeks ago I decided to finally have a go at building a non-trivial site using uWSGI, Flask, sqlalchemy and mo
by corford 14y ago
I'm a PHP guy (started in the PHP3 days) and a few weeks ago I decided to finally have a go at building a non-trivial site using uWSGI, Flask, sqlalchemy and mongrel2. I knew a bit of python (from having written a few trivial sysadmin related scripts) but apart from that I was starting cold. I'm now a few weeks in and while I'm not ready yet to jump ship back to my PHP comfort zone, I can say I've been surprised to find that Python (one of the "better, grown up" languages that's always cited in these PHP bashing threads) has quite a few warts of its own:
- Packaging in python seems to have been a nightmare up until quite recently. It appears things are a little more sane now that pip is emerging as the new standard but there's still documentation all over the web referencing easy_install. Of course, then there's distutils2 to muddy the waters...
- The Python 2 to Python 3 transition was and continues to be an almighty upheaval. At the moment huge swathes of the python ecosystem have yet to introduce python3 support (e.g. Flask).
- Virtualenv is a fairly ugly hack in itself but even worse than that, trying to move a virtualenv directory somewhere else on the file system turns out to be impossible unless you use another third party tool.
- The python language has no switch statement. I refused to believe it when I first discovered this but it is actually true.
So, two weeks or so in and those are my main gripes thus far. Apart from that, I'm enjoying python. My favourite "python thing" discovered so far is all the cool list iteration syntax.