gdesklets ?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,041
Members
47,643
Latest member
ashutoshjha_1101

Latest Threads

Top