[Python-projects] pylint W0142 recommended corrections
Sylvain Thénault
sylvain.thenault at logilab.fr
Fri Jul 13 11:27:04 CEST 2007
On Wednesday 11 July à 09:57, Gurganus, Brant L wrote:
> I am working on some Python code where Pylint gives a warning of:
> W: 31:ProxyFactory._init_instance: Used * or ** magic
>
> The basic code is:
> def _init_instance(self, *args, **kwargs):
> self.__class__._original.__dict__["__init__"](self, *args, **kwargs)
>
> The only other method in my mind for doing this would be to use apply, but the
> *args, **kwargs method appears to be favored over apply right now.
>
> Is there a recommended way to correct this or is this a case where silencing
> the warning is a better solution?
well, pylint flag * or ** usage to avoid abuse of this construction, but
it's still useful or necessary sometimes, as probably in your case, so
you can silence it i think.
--
Sylvain Thénault LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
Python et calcul scientifique: http://www.logilab.fr/science
More information about the Python-Projects
mailing list