[Sugar-devel] [PATCH v3 sugar] Pulsing icon delayed by 5 seconds or so SL#2080

James Cameron quozl at laptop.org
Fri Oct 8 19:54:26 EDT 2010


On 08/10/2010, at 9:06 AM, Anurag Chowdhury wrote:
> +            for i in range(0, 5):
> +                easing = EASE_IN_EXPO
> +                duration = duration * 100
> +                i = i + 1

That last line is not required.  See for example this manual test:

>>> for i in range(0, 5):
...     print i
...     i = i + 1
... 
0
1
2
3
4
>>> for i in range(0, 5):
...     print i
... 
0
1
2
3
4
>>> 

Further, the variable i is not referenced within the for loop, so the code could be reduced to:

> +            easing = EASE_IN_EXPO
> +            duration = duration * 10000000000

Which does not look reasonable.

--
James Cameron
System Test Coordinator
One Laptop per Child







More information about the Sugar-devel mailing list