By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,908 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,908 IT Pros & Developers. It's quick & easy.

gdesklets ?

P: n/a
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
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.