[Qgis-developer] Python coding style for QGIS

Vincent Picavet vincent.ml at oslandia.com
Tue May 1 06:34:35 EDT 2012


Hi,

> I would suggest that we use PEP8 - many editors will parse this and
> there are checking tools that can be run from the command line. I
> would also suggest we use 4 space indents so we can process code using
> pyindent. I know it isnt very consistent with QGIS C++ coding standard
> but many python coders are used to these standards and they are easy
> to check and enforce.

+1 for using PEP8 as more tools and projects use it.
I don't think the c++ consistency it is a problem : different language, 
different coding standards.

> I think it would be great to extend our CODING doc to include python
> guidelines. I have already worked on similar guidelines for another
> project [1] which we could easily adapt.

+1

Vincent


More information about the Qgis-developer mailing list