gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] json service


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] json service
Date: Thu, 15 Jul 2010 22:03:16 +0200

> whatever gave you that impression? :)  no, it's more that i have a way of
> getting round unfamiliar code very very quickly, and it's pretty much a
> standard MVC app

That´s good, BTW.

> my honest opinion?  it's pretty well organised: the module subdivisions
> are
> thorough and clear, and the level of commenting is above-average standard.

:-)

> the only thing that's a complete pain is the use of tabs for indentation,
> which is _not_ standard,

It is still "allowed", although second best choice.

> the other thing which is non-PEP8 is the use of separator lines to divide
> functions

It must be me finding the whitespace a bit too little to easily scan
(also because I use whitespace lines in other places, too).

> _without_ also putting in whitespace breaks between them.

This could easily be helped.

> this
> makes it realllly hard on the eyes, to locate functions.  most python
> programmers are used to searching for the keyword "def" or the keyword
> "class" which of course stick out due to the indentation,

Only partially so. They can be at different levels of indentation (but,
yes, always "stick out" to the left).

> so there really
> _is_ no need for comment line separators

That´s only true if you find them "enough". I am (just ever so) slightly
visually impaired - that´s probably why I find them too light in making
a distinction.

> for c-code, and in fact the comment-line-separator, because it is not
> indented at the same level as the "def",

But it is ?   At least it is intended to be. If you find places
where it isn´t I´d like to know.

This is how I typically format the body of Python files:

#=======================================
# logical section in file
#=======================================
class xxx1:

   def __init__():
      ...
   #------------------------------------
   def method_A():
      ...

#---------------------------------------
def method_for_class():
   ...

#=======================================
class xxx2:

   ...

#=======================================
# next logical section
#=======================================

...


> actually makes it *harder* to
> find methods!

Only if ... see above.

> oh, the other thing, again non-PEP8, was the occasional >80 char line.

If you find any let us know - we can fix those.

Karsten
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



reply via email to

[Prev in Thread] Current Thread [Next in Thread]