« Thread on Alexis de Tocqueville Institution | Main | The absolute best Venus transit photo »

June 14, 2004

Comments

David Cantrell

Out of interest, does it actually do the calculation when it does the assignment, or is it lazily evaluated in a background thread or something like that?

Gary Robinson

I'm 99.999% sure it's actually doing the calculation. For one thing, Python has no facility to do that kind of thing "in a background thread" that I've ever heard of, and I probably qualify as an expert in the language. Moreover, after the initial assignment to p, I can do p % 2 and instantaneously get back the correct answer (1).

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)