Generator hack to avoid an exception

2013-03-29 Thread Kruno Saho
I understand that 'with ignore(...)' will be coming out in Python 3.4 next year, but in the mean time I have added a yield at the end of a particular coroutine. Here is the 'fixed' version: http://pastebin.com/c8kbqc4w Here is the original version, which I believe is more pythonic: http://paste

Re: Newbie to python. Very newbie question

2013-04-07 Thread Kruno Saho
On Sunday, April 7, 2013 9:16:27 PM UTC+10, ReviewBoard User wrote: > Hi > > I am a newbie to python and am trying to write a program that does a > > sum of squares of numbers whose squares are odd. > > For example, for x from 1 to 100, it generates 165 as an output (sum > > of 1,9,25,49,81) >