[issue7439] Bug or expected behavior? I cannot tell.

2009-12-05 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: The problem with the shorthand form is that the generators use the values that are bound to 'a' and 'p' when they are iterated, not when they are created. You can test this by inserting: a = X just before the assert: you'll get

[issue7439] Bug or expected behavior? I cannot tell.

2009-12-05 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: Thank you! A prime sieve variant is a better way to generate the generalized Hamming numbers I'm after, at least if the maximum is known ahead of time. Dave Lambert -- ___ Python tracker

[issue7439] Bug or expected behavior? I cannot tell.

2009-12-05 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7439 ___

[issue7439] Bug or expected behavior? I cannot tell.

2009-12-04 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: Raymond Hettinger posted clever Hamming number generator, http://code.activestate.com/recipes/576961/ which I tried to modify. The function gives incorrect output when called as hamming_numbers(shorthand = True). It seemed reasonable