One liners

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Dec 7 22:10:30 CET 2013


On 06/12/2013 23:54, Dan Stromberg wrote:
>
> Does anyone else feel like Python is being dragged too far in the
> direction of long, complex, multiline one-liners?  Or avoiding temporary
> variables with descriptive names?  Or using regex's for everything under
> the sun?
>
> What happened to using classes?  What happened to the beautiful emphasis
> on readability?  What happened to debuggability (which is always harder
> than writing things in the first place)?  And what happened to string
> methods?
>
> I'm pleased to see Python getting more popular, but it feels like a lot
> of newcomers are trying their best to turn Python into Perl or
> something, culturally speaking.
>

I see all of the above as being down to poor quality programmers who are 
new to Python and have their priorities wrong.  The following is 
extracted from Steve Maguire's "Writing Solid Code".  It's my belief 
that this is a reasonable summing up.

Jack's Priority List      Jill's Priority List
Correctness               Correctness
Global efficiency         Testability
Size                      Global efficiency
Local efficiency          Maintainability/clarity
Personal convenience      Consistency
Maintainability/clarity   Size
Personal expression       Local efficiency
Testability               Personal expression
Consistency               Personal convenience

Jill wants to write good quality, Pythonic code, Jack doesn't, yep?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list