Python’s module names suck. PyPI sucks.


I’m a Perl programmer. I realize now that I’ve been spoiled by CPAN, the Comprehensive Perl Archive Network. It’s an enormous repository of Perl modules. If someone’s written a Perl module, it’s probably on CPAN.

I decided yesterday to start a little project using Python. New languages are best learnt when you have a project in mind, so I thought I’d use the opportunity to learn Python. Part of this project involves converting units, say from feet to meters. Surely someone’s written a Python module that does this, right?

Well, yes, someone has. I discovered this after an hour of searching. First I didn’t know where to look, so I started with Google. That lead to frustration, so I tried to find Python’s equivalent of CPAN, which after five minutes I discovered is called PyPI, or the Python Package Index. Fair enough. Let’s search for “unit conversion“. The results are less than useful. icCommunity? Low-level ZODB relationship index? What the fuck do those have to do with unit conversion?

After looking through the list you’ll eventually come to firkin. First off, stupid name. Second off, it’s version 0.02, which in programmer-speak is an incomplete and not-ready-for-prime-time module.

Seriously, Python, why can’t you come up with better naming conventions for packages? Would a little namespacing kill you? Take a look at Perl: if I do a CPAN search for “unit conversion” I get Math::Units as the first hit. By its name you can pretty much tell what it’s for: mathematical operations for units.

But firkin? That’s supposed to tell you something useful?

I was eventually pointed to a Python module called Unum, which is just as horribly named as firkin. And Unum isn’t on PyPI! What’s the point in having a repository if people aren’t going to use it?

[tags]python, perl, pypi, cpan, firkin, math::units, unum[/tags]

  1. #1 by James on 28 January 2009 - 6:35 am

    I can’t agree with you more. Here is a tip: stay away from python, it sucks major ass. I know, I studied it five to seven our a day everyday for six months stright.

    What did I learn? The community supports three or four different versions, code is terribly buggy becuase everyone uses a different indention style, no-one follows the PEP, python modules are terribly, terribly inefficient (and most are only half done and will only stay half done), the modules that actually WORK are for older versions of python that are buggy as hell, those modules that do work are overly complex in nature, requiring tons of framework and initialization code, and on top of it all, if you post to a python community or mailing list expect a helluva long wait for a reply.

    Python is shit, shit, and more shit. You’d be better off inventing your own damn scripting language via C.

    Sadly, half the above complaints also apply to C++ and many other languages. the only reason the top ten programming languages are as popular as they are is becuase there is no other alternative.

    As for me, I’m going to go back to learning C and assembly, better to reinvent the wheel then struggling to pull a cart with square-shaped wheels (for lack of an alternative).

  2. #2 by Alex Rosslyn on 23 August 2009 - 4:48 pm

    You are absolutely correct sir.

    Python sucks ass. First of all, whitespace? What the hell? Second: Total and quite disturbing lack of parentheses (And then they say it’s ‘structured’). Third: The guys in the Py won’t solve your problems because of what James said: Everyone is using some obscure version nobody uses, and they just assume that you are using Linux just because you are a programmer. Python sucks ass.

    In a perfect world, everyone would be able to create their own programming language. Don’t listen to Bjarne’s advice in the C++ book: “Don’t reinvent the wheel–Use libraries”. That may work in C++, but in Python, it doesn’t.

    And James is also correct about something else: It is better to reinvent the wheel, rather than pulling a cart with square-shaped wheels.

  3. #3 by Taras Mankovski on 06 December 2009 - 9:12 pm

    Just because you prefer Perl doesn’t mean that Python sucks.

    You guys seem to have a very hard time staying on topic. The topic is “Python’s module names suck. PyPI sucks.”

    “different indention style” in 2 years I have never encountered this to be a problem, not once.

    “no-one follows the PEP”, my experience has been that if people are aware of the PEP then they will use it. Not everyone knows about all of them. I find that the problem is usually caused by non-Python developers who reinvent the wheel by implementing modules that already have been implemented in the Pythonic way.

    “python modules are terribly”, I’m not really sure what you mean by that, it sounds a bit general. Obviously not all Python modules are terrible. Django is not terrible, that’s an easy example. I find that quiet a few modules have at least some test coverage.

    “terribly inefficient (and most are only half done and will only stay half done)” again pretty generic

    I have quiet a few friends who used to write PERL every day and now do their projects in Python instead. I think mainly because of the modules that are available in Python.

    “Don’t listen to Bjarne’s advice in the C++ book: “Don’t reinvent the wheel–Use libraries”. That may work in C++, but in Python, it doesn’t.”
    Using libraries is a normal thing in Python. All of Zope was built on using libraries. Any Plone or Django project requires extensive use of modules and works quiet well, especially when used with ‘buildout’.

    I’m sure you guys are pretty smart, but making those kind of generic statements doesn’t really bode well for your credibility.

  4. #4 by Taras Mankovski on 06 December 2009 - 9:16 pm

    I forgot to include that I agree that names for Python modules are a bit too cutesy and pypi is far from great.

  5. #5 by python hater on 18 March 2010 - 9:15 am

    I think libraries should be used in any language but i do agree python sucks.

  6. #6 by Python suckssssssss on 27 September 2010 - 1:12 pm

    I am a JAVA fan, I start using python in a new project
    I start with this
    my_function ( config ):

    I typed config and then hell nothing comes

    how the hell am I supposed to know what’s the type of config ???

    PYTHON SUCKSSSSSSSSSSSSSS

  7. #7 by Dana Woodman on 20 December 2010 - 8:33 pm

    @Python suckssssssss

    You obviously don’t know what you are doing because in Python, like EVERY language, there is a way to check type:

    config.__class__

    It seems like most frustration and hatred for a language comes from people who are new to it, which is understandable. However, saying something as flat out and false as “python sucks” is just ignorant.

    Taras is right, making generic statements like you guys are doing is just making you look like idiots.

    Regarding the article itself, I agree fully that PyPi needs improvement. I’d love to see it with a much improved interface and better categorization and naming conventions.

    Package names can occasionally be weird in Python, but if you have ever played around with Ruby, you will know that Python is not the only language that uses some bizarre naming for their modules and methods (e.g. Rake, Gem, puts, etc… in Ruby). In fact, I find Python to have one of the cleanest and most straightforward syntaxes around.

    Every language has it’s own features and quirks and it is just a matter of figuring out if the language is right for your project and then learning it’s nuances.

    Cheers

  8. #8 by Phil on 08 April 2011 - 5:38 pm

    I choose not to use the ‘quirk’ called Python.

  9. #9 by Someone on 01 February 2012 - 2:37 pm

    I like Python ;-)

(will not be published)