Web Frameworks Excessive Complexity

Andriy Kornatskyy andriy.kornatskyy at live.com
Wed Nov 21 06:47:00 EST 2012


I believe for the quality of code you produce.

Thanks.

Andriy


----------------------------------------
> From: steve+comp.lang.python at pearwood.info
> Subject: Re: Web Frameworks Excessive Complexity
> Date: Wed, 21 Nov 2012 11:43:10 +0000
> To: python-list at python.org
>
> 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
 		 	   		  


More information about the Python-list mailing list