DEV Community

Discussion on: Choosing Python for Web Development: Top 16 Pros and Cons

rhymes profile image
rhymes • Edited on

A couple of notes right from the start:

Python was opensource since the first public release, not since version 2.0, its first public version was in February 1991.

Instagram has around a billion daily active users, not 4 million.

It doesn’t take much effort to write and maintain asynchronous code using Python since there are no deadlocks or research contention or any other confusing issues

This is misleading. Async programming is hard, please don't go around tell people that concurrency is easy eheh. asyncio is a great step forward (asyncore and asynchat in Python 2 were truly horrible) but it's common knowledge that it is not that easy. Which is also the reason they are wrappers on top of it and different approaches like trio to try to make programmers lives easier.

Python does support multiprocessing, although it might not be as flexible or convenient as other languages. This can create certain limitations when you’re writing the code.

I think this sentence is detrimental for a beginner. There's no explanation, just a "yeah you can do it but it's not great". In strict terms Python has multiprocessing support that can have an easy to use interface, I even wrote an article about here on DEV: How to make Python code concurrent with 3 lines.

I'm sure you're referring to something specific but this sentence instills doubt in people without actually having an explanation for it.

I don't think you meant multithreading instead of multiprocessing, but maybe you did?

There's a difference between "multiprocessing" and "support of multiple processors" (which Python always has through multiprocessing but doesn't have in memory bound situations in multithreading due to the GIL). From The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads. Due to this, the multiprocessing module allows the programmer to fully leverage multiple processors on a given machine. It runs on both Unix and Windows.

Another thing you should be aware of when considering Python for your project is that concurrency and parallelism aren’t intended for elegant use in Python. Because of that, the design might not look as sophisticated as you’d like.

I think assertions like this should be clarified in overview articles aimed at beginners. As a seasoned developer I have a likely idea of what you mean (the fact that concurrency is not a language construct but it's done through libraries?), but I'm honestly not even sure about that.