R
raptor
hi,
I'm wrinting a gdesklet (gdesklets.gnome.org).. Excuse my ignorance
this is my first ever python script...so on the question :
why I should write :
self.__percent = int((float(self.__diff) / float(self.__max)) * 100)
instead of just :
self.__percent = int((self.__diff / self.__max) * 100)
it took my one hour experiment to find it :"(
Do I have to do always typecasting... or this is some special case.
tia
I'm wrinting a gdesklet (gdesklets.gnome.org).. Excuse my ignorance
this is my first ever python script...so on the question :
why I should write :
self.__percent = int((float(self.__diff) / float(self.__max)) * 100)
instead of just :
self.__percent = int((self.__diff / self.__max) * 100)
it took my one hour experiment to find it :"(
Do I have to do always typecasting... or this is some special case.
tia