RE: Web Frameworks Excessive Complexity

Discussion in 'Python' started by Andriy Kornatskyy, Nov 21, 2012.

  1. I believe for the quality of code you produce.

    Thanks.

    Andriy


    ----------------------------------------
    > From:
    > Subject: Re: Web Frameworks Excessive Complexity
    > Date: Wed, 21 Nov 2012 11:43:10 +0000
    > To:
    >
    > On Wed, 21 Nov 2012 22:21:23 +1100, Chris Angelico wrote:
    >
    > > Counting complexity by giving a score to every statement encourages code
    > > like this:
    > >
    > > def bletch(x,y):
    > > return x + {"foo":y*2,"bar":x*3+y,"quux":math.sin(y)}.get(mode,0)
    > >
    > > instead of:
    > >
    > > def bletch(x,y):
    > > if mode=="foo": return x+y*2
    > > if mode=="bar": return x*4+y
    > > if mode=="quux": return x+math.sin(y) return x
    > >
    > > Okay, this is a stupid contrived example, but tell me which of those
    > > you'd rather work with

    >
    >
    > Am I being paid by the hour or the line?
    >
    >
    >
    >
    > --
    > Steven
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    Andriy Kornatskyy, Nov 21, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Kern

    Re: Web Frameworks Excessive Complexity

    Robert Kern, Nov 20, 2012, in forum: Python
    Replies:
    0
    Views:
    130
    Robert Kern
    Nov 20, 2012
  2. Andriy Kornatskyy

    RE: Web Frameworks Excessive Complexity

    Andriy Kornatskyy, Nov 20, 2012, in forum: Python
    Replies:
    0
    Views:
    140
    Andriy Kornatskyy
    Nov 20, 2012
  3. Robert Kern

    Re: Web Frameworks Excessive Complexity

    Robert Kern, Nov 20, 2012, in forum: Python
    Replies:
    7
    Views:
    144
    Modulok
    Nov 22, 2012
  4. Andriy Kornatskyy

    RE: Web Frameworks Excessive Complexity

    Andriy Kornatskyy, Nov 20, 2012, in forum: Python
    Replies:
    0
    Views:
    133
    Andriy Kornatskyy
    Nov 20, 2012
  5. Robert Kern

    Re: Web Frameworks Excessive Complexity

    Robert Kern, Nov 20, 2012, in forum: Python
    Replies:
    0
    Views:
    134
    Robert Kern
    Nov 20, 2012
Loading...

Share This Page