-----Original Message----- From: python-list-bounces+jasons=adventureaquarium....@python.org [mailto:python-list-bounces+jasons=adventureaquarium....@python.org] On Behalf Of Stefan Sonnenberg-Carstens Sent: Wednesday, December 22, 2010 3:24 PM To: python-list@python.org Subject: [SPAM] - Re: Code review request
Am 22.12.2010 19:34, schrieb Jason Staudenmayer: Hi All, <snip> Hi Jason, the program could be more dense. You have several redundant code in there, too. For example, all the *Employee functions basically just call dbconnect and let it execute the sql there. dbconnect in this respect is not a really straight name, as it does more than only connect to a database. You should avoid "!= None", better is "is not None". The program flow is "awkward": if argv is empty (better say "if not argv"), you show one employee, but then continue to parse opts. I think the program would be more readable, if you would just handle the different cases in an if-elseif-else-cascade. The global statement is not needed, But you can also try pylint, which will point some things out: Report 78 statements analysed. <snip> Thanks for the advice, I'll try to rework some of those issues. I did try the if-elif-else for the getopts but it didn't flow right for some reason (I'll try it again though). Thanks again. Jason ..·><((((º> -- http://mail.python.org/mailman/listinfo/python-list