Em Wed, May 20, 2015 at 03:54:22PM +0200, Petr Oros escreveu:
Arnaldo Carvalho de Melo píše v St 20. 05. 2015 v 10:31 -0300:
> Em Wed, May 20, 2015 at 10:06:23AM +0200, Petr Oros escreveu:
> > Arnaldo Carvalho de Melo píše v Út 19. 05. 2015 v 17:10 -0300:
> > > Em Tue, May 19, 2015 at 04:34:27PM -0300, Arnaldo Carvalho de
> > > Melo
> > > But if you insist that it be tied to the class, at least lets use
> > > the
> > > right mechanism, static methods:
>
> > >
https://julien.danjou.info/blog/2013/guide-python-static-class
> > > -abstract-methods
>
> > Ok, my last question. What about code consistency?
> > Found you anywhere staticmethod in tuna code?
>
> Fair question, it should be used where it makes sense, one never
> stops learning :-)
I understand, if you plan code refactoring ;)
> > All methods in config have "self" param. Why do
it for two new
> > methods
> > different? What talk other people, when see staticmethod only on
> > this
>
> Because it is not used.
>
> > two places?
>
> That the other places where self is present but not used should use
> it?
After fast look, for example here :D :
checkTunedDaemon(self)
currentActiveProfile(self)
setCurrentActiveProfile(self)
getSystemValue(self)
isFnString(self, string)
getFilesByFN(self, string)
Ok, I'll come up with a patch for that, then do some testing, if nobody
does it first ;-)
- Arnaldo