Agree Python FTW!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: [email protected]
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






-----Original Message-----
From: "Alan D. Cabrera" <[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Sunday, March 22, 2015 at 9:41 PM
To: "[email protected]" <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: svn commit: r1668140 - in /steve/trunk/pytest/www/cgi-bin:
lib/voter.py rest_admin.py rest_voter.py

>
>> On Mar 20, 2015, at 1:09 PM, [email protected] wrote:
>> 
>> Added: steve/trunk/pytest/www/cgi-bin/lib/voter.py
>> URL: 
>>http://svn.apache.org/viewvc/steve/trunk/pytest/www/cgi-bin/lib/voter.py?
>>rev=1668140&view=auto
>><http://svn.apache.org/viewvc/steve/trunk/pytest/www/cgi-bin/lib/voter.py
>>?rev=1668140&view=auto>
>> 
>>=========================================================================
>>=====
>> --- steve/trunk/pytest/www/cgi-bin/lib/voter.py (added)
>> +++ steve/trunk/pytest/www/cgi-bin/lib/voter.py Fri Mar 20 20:09:42 2015
>> @@ -0,0 +1,40 @@
>> +import hashlib, json, random
>> +from __main__ import homedir
>
>Importing from __main__ is a brittle practice.  It’s better to either
>explicitly pass it to functions or create a class that will hold the
>context that contains homedir and config.
>
>Aesthetically, camel case identifiers should be reserved for class names.
> Use lower case characters for everything else and separate words with
>underscores “_”.
>
>Finally, never comment out code; that’s what Subversion is for.  Just
>delete it.
>
>Mmmmmmm, all this lovely Python code.  Can’t wait to ditch the Perl
>stuff…  ;)
>
>
>Regards,
>Alan
>

Reply via email to