This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients amaury.forgeotdarc, belopolsky, mark.dickinson
Date 2008-04-25.23:16:42
SpamBayes Score 0.2145643
Marked as misclassified No
Message-id <1209165404.62.0.512734332356.issue2690@psf.upfronthosting.co.za>
In-reply-to
Content
> Hmm, AFAIKT there is always at least one non-residue between 1 and p
> and therefore you can just write
>
> for i in itertools.count(1):
>     if (i_is_a_nonresidue_modulo_p):
>          break
>
> maybe with an additional check for p > 1.

Sure.  It's just uglier that way. :-)  And I feel it would be mildly 
annoying not to be able to use the obvious tool for the job, for subtle 
reasons.  It's also a potential source of bugs: one might write such code 
using range and only discover later that it fails unexpectedly for large 
inputs.

These really aren't serious objections---just mild preferences.  I'll stop 
being disruptive now :)
History
Date User Action Args
2008-04-25 23:16:45mark.dickinsonsetspambayes_score: 0.214564 -> 0.2145643
recipients: + mark.dickinson, amaury.forgeotdarc, belopolsky
2008-04-25 23:16:44mark.dickinsonsetspambayes_score: 0.214564 -> 0.214564
messageid: <1209165404.62.0.512734332356.issue2690@psf.upfronthosting.co.za>
2008-04-25 23:16:43mark.dickinsonlinkissue2690 messages
2008-04-25 23:16:42mark.dickinsoncreate