Re: Why did Quora choose Python for its development?



On 5/22/2011 3:44 AM, Octavian Rasnita wrote:

I've noticed that on many Perl mailing lists the list members talk
very rarely about Python,

Interesting. I learned about Python on comp.lang.perl, but that was over a decade ago.

but only on this Python mailing list I read
many discussions about Perl, in which most of the participants use to
agree that yes, Python is better, as it shouldn't be obvious that
most of the list members prefer Python.

This list really has very little other-language bashing.

A few months ago I have asked how can I create a dictionary from a
list, and there were so many techniques that I think that it is just
a buzzword that in Perl there are many ways to do it, while in Python
there is a single way. In Python I found from the messages I received
on this mailing list that there are a lot of ways, without even
beeing a "recommended" way, while in Perl there is a single way, of
course much shorter and clearer.

I forget the exact question you asked, but this list is not the doc. The doc section on dicts gives dict(list_of_key_value_pairs) as the one true way, given such an input. The Perl way cannot be clearer and can only be shorted if it uses something shorter that dict().

If the list is a flat list of alternating keys and values, then yes, they must be paired, and there are several ways to do that, partly depending on the exact specifications, including allowed input and how an odd key left over should be treated. In any case, unpaired keys and values strikes me as an unusual input format for a dict. They typically would have been paired as some point and in Python, should not need to be unpaired.

--
Terry Jan Reedy

.



Relevant Pages

  • Re: Python or PHP?
    ... If it's one of the things for which Python ... every language here and there more ways to do something. ... you make Perl more complicated than it is:-D. ... Not the programmer. ...
    (comp.lang.python)
  • Recommend an E-book Meeting the Following Criteria (Newbie, Long)
    ... I know several programming languages namely Java, Perl and C in this order ... Now I'm wondering which Python book I should get as there are so many out ... I'd like to mostly concentrate on language features but some pointers ...
    (comp.lang.python)
  • Industry profiles: Software tools: Exclusive to comp.databases.pick: Why python? (from 2000)
    ... "My first look at Python was an accident, and I didn't much like what I ... language called SNG for manipulating PNG ... Perl, of course, is the 800-pound gorilla of modern scripting languages. ... The design objective of fetchmailconf ...
    (comp.databases.pick)
  • Re: Choosing Perl/Python for my particular niche
    ... >> For most general purpose tasks, I reach for Python first. ... > syntax and perhaps my lack of bottomless commitment (knowing Perl would not be ... verilog) so that it can be used for another e.g. verilator, ... using a standalone simulator to simulate the original verilog. ...
    (comp.lang.perl.misc)
  • Re: Choosing Perl/Python for my particular niche
    ... >> For most general purpose tasks, I reach for Python first. ... > syntax and perhaps my lack of bottomless commitment (knowing Perl would not be ... verilog) so that it can be used for another e.g. verilator, ... using a standalone simulator to simulate the original verilog. ...
    (comp.lang.python)