[IPOL discuss] Question about demos python code

Nicolas Limare nicolas.limare at cmla.ens-cachan.fr
Thu May 5 15:26:20 CEST 2011

> 1) Almost all demos forget this parameter 'public', so this is a warning in 
> pylint. Demos are required to be clean of any pylint warning...

Actually, this is not a requirement, but a wish. Pylint will help us
correct common errors and maintain a consistent style. But some
warnings won't easily be avoided, such as:
* too many parameters for the functions
* too many classes for the class
* function redefined with a different nmber of parameters

In addition, I don't like the CamelCaseModel for class names, I
prefer underscore_naming. 

So, you can ignore these warnings, and use pylint to spot
indentation/spacing inconsistencies, dead code, unused variables, ...

> 2) The few demos that include this parameter are from Pascal Getreuer, but 
> they do not use this parameter in any way. Pascal, or anyone else,
> do you know what is the role of this parameter?

This "public" parameter is needed when a user wants to change the
archiving preferences for his uploaded images.

> 3) In my demos, I need an extra parameter for the method result,
> indicating if the algorithm failed. How do I do that without getting
> a warning from pylint because the parameters are not the same as in
> the base method ?

Ignore the wearning. Actually, I think the base methods are useless,
because never used. Maybe we should simply remove them.

Nicolas LIMARE - CMLA - ENS Cachan    http://www.cmla.ens-cachan.fr/~limare/
IPOL - image processing on line                          http://www.ipol.im/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://tools.ipol.im/mailman/archive/discuss/attachments/20110505/37a770ff/attachment.pgp>

More information about the discuss mailing list