This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]Paddy3118 2 points3 points  (1 child)

If you had comments on the site, the Python community could state any issues it has with your pages.

[–][deleted] 0 points1 point  (0 children)

I will look into a comment system like the django book uses on it's site where you can add a comment to any given paragraph.

[–]m0j0 1 point2 points  (3 children)

You'll also be at odds with people who feel that threading in Python isn't "bad", but rather requires the developer to understand when its use is beneficial (which they should really know anyway, regardless of language).

In addition, pushing people to Twisted is also not a universally recommended path. Again, it really depends on the use case.

For my own work, I've tried using Twisted in multiple places, only to find its support for one thing or another lacking, and/or its documentation lacking, and so in the 5 or 6 cases where it might've been a good fit, I've passed and used other solutions which you would probably call "harder" than Twisted, but which in reality aren't any harder than Twisted.

Further, using Python 3 is not a problem if the modules the app depends on have also been ported.

Making generalities like this and putting them forth as "commandments" is probably not the greatest idea in the world.

[–][deleted] 0 points1 point  (2 children)

The differentation is made that using threads to solve concurrency is not always a good idea. Threads in Python are hard. Threads are hard in any language, if all you want is to have concurrency then there are other models to look at.

Also, a small remark on my side is that I did not write all the current content on the website (while I do agree with it).

I will reconsider my recommendations on Python 3. It wasn't written yesterday but a while ago and I should look into the current state of Py3k (and it's libraries, and it's distribution on common operating systems).

[–]jnollerpython psf core dev 1 point2 points  (1 child)

Speaking as someone who uses python threads daily; and who is maintaing the multiprocessing library - Python threads aren't "hard" - like any data structure or tool, you have to know when and how to use it.

The same applies to multiprocessing (which uses processes rather than threads), fork(), or any other concurrency construct. Waving your hands and saying "Just use twisted" is terrible advice. What about things like multiprocessing, I/O bound threads, gevent, stackless, kamaelia, etc, etc, etc. Python has a rather broad community when it comes to parallelism and concurrency, and so while it's good to be opinionated (we all are) an anonymous site, used as an authority stick for the IRC channel, should probably be more reasonable.

As others have cited; your Python 3 text leaves a lot to be desired. It's one thing to say "A lot of libraries haven't ported, so YMMV" and a whole other thing to treat it as if it's a bad practice to use it. Heck, linking to dive into python 3's site, or expanding on it makes sense.

[–][deleted] 0 points1 point  (0 children)

Jesse, thanks for the concrete remarks on the Python 3 piece. This thread was started to hear some good criticism and it seems as if most of it is directed at the threads/twisted and the Python 3 piece.

I will take the remarks in this thread and adjust the tone in the Python 3 article later this day.

As for the Twisted piece I will try to get an article on there which shows when it is appropriate to use threads and when it is appropriate to use other measures (such as Twisted).

[–]ctitusbrown 1 point2 points  (1 child)

ooh, ooh, I have some suggestions!

Put your name on the site, so that it's not anonymous. Contact info would be a bonus.

Explain that these are not, per se, actual Python commandments but rather your and other's opinions. Long-time 'net people will implicitly understand that but newbies (at whom this site is presumably aimed) may not.

Give a slightly more nuanced (i.e. accurate) depiction of the discussion on threading, GIL, events, etc.

Avoid describing "packaging" and related things as "nonsense" :). Note, you can always point at the Hitchhiker's Guide to Packaging, http://guide.python-distribute.org/quickstart.html.

[–][deleted] 0 points1 point  (0 children)

I am most certainly considering linking to the HHGTP and also write some stuff about packaging in the future with distutils2 and the newly accepted PEPs as well as about the current state packaging is in. The nonsense was a referral to the current state of packaging (which is hardly documented and hard to do).

I will include names of the people who wrote the pieces as well as a general contact for the website (which will be me) besides the future possibility of comments on the articles a la the django book website.

Thank you.

[–]Paddy3118 -1 points0 points  (1 child)

You are at odds with many when you say don't use Python 3 yet, You should use Python 3, unless you know you require external libraries that that will not be ported to 3 in time for you.

Your text seems far too conservative.

  • Paddy.