News for hackers. Stuff that matters.
Re:Towards a Vim-like Emacs by vithlani on Monday November 10, 2014 @07:21PM (#8587533)
What bullshit.

I can't touch type but my code reads:

  def snmp_command(session, oid, media_servers):
    result = list()
    for host_name in media_servers:
        snmp = SNMP_CMD.format(host=host_name, oid=oid)
        snmp_reply = [x for x in session.cmditer(snmp)]

        if len(snmp_reply) == 0:
            log.warning("No data for EMS Media Server SNMP cmd {0} for host {1}".format(snmp, host_name))
            continue

        # add the Media Server host from which we got this reply to the list of snmp reply
        snmp_reply.append(host_name)
        result.append(snmp_reply)

    return result
Re:Towards a Vim-like Emacs by Derbasti on Tuesday November 11, 2014 @03:41AM (#8588899)
As I said, not you, particularly. But bad typists exist, and they tend to want to type less, which leads to code that is worse than it could be.

That said, where's your docstring? Why are your lines longer than 80 chars? Why is your indent 2 chars instead of 4? What does `oid` mean? http://legacy.python.org/dev/peps/pep-0008/