Re: relative speed of incremention syntaxes (or i=i+1 VS i+=1)

2011-08-22 Thread Richard D. Moores
On Sun, Aug 21, 2011 at 18:12, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: But really, we're talking about tiny differences in speed. Such trivial differences are at, or beyond, the limit of what can realistically be measured on a noisy PC running multiple processes (pretty

Puzzled about the output of my demo of a proof of The Euler Series

2011-08-12 Thread Richard D. Moores
For the first time in my 7 years of using Gmail, I accidentally deleted my original post and it's one reply by casevh. I found both in the list archive, and with this post both quote casevh's reply and answer it. Sorry about my screw up. On Aug 10, 4:57 pm, Richard D. Moores rdmoo... at gmail.com

Puzzled about the output of my demo of a proof of The Euler Series

2011-08-10 Thread Richard D. Moores
I saw an interesting proof of the limit of The Euler Series on math.stackexchange.com at http://math.stackexchange.com/questions/8337/different-methods-to-compute-sum-n-1-infty-frac1n2. Scroll down to Hans Lundmark's post. I thought I'd try to see this pinching down on the limit of pi**2/6. See

Is there a Programming FAQ for Python 3.x?

2011-07-15 Thread Richard D. Moores
Is there a Programming FAQ for Python 3.x? There is http://docs.python.org/faq/programming.html, but it's for 2.7 Thanks, Dick Moores -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a Programming FAQ for Python 3.x?

2011-07-15 Thread Richard D. Moores
On Fri, Jul 15, 2011 at 16:39, Thomas Jollans t...@jollybox.de wrote: On 07/16/2011 01:24 AM, Richard D. Moores wrote: Is there a Programming FAQ for Python 3.x? There is http://docs.python.org/faq/programming.html, but it's for 2.7 Thanks, Dick Moores http://docs.python.org/py3k/faq

Re: IDLE won't wrap lines of text

2011-02-20 Thread Richard D. Moores
On Sun, Feb 20, 2011 at 16:31, Rhodri James rho...@wildebst.demon.co.uk wrote: On Sat, 19 Feb 2011 23:56:45 -, Richard D. Moores rdmoo...@gmail.com wrote: Vista Python 3.1.3 I can't figure out how to get IDLE to wrap text pasted in from, say, a newspaper article. Usually, a each

Re: IDLE won't wrap lines of text

2011-02-20 Thread Richard D. Moores
On Sun, Feb 20, 2011 at 18:32, Rhodri James rho...@wildebst.demon.co.uk wrote: On Mon, 21 Feb 2011 01:41:12 -, Richard D. Moores rdmoo...@gmail.com wrote: On Sun, Feb 20, 2011 at 16:31, Rhodri James rho...@wildebst.demon.co.uk wrote: On Sat, 19 Feb 2011 23:56:45 -, Richard D. Moores

IDLE won't wrap lines of text

2011-02-19 Thread Richard D. Moores
Vista Python 3.1.3 I can't figure out how to get IDLE to wrap text pasted in from, say, a newspaper article. Usually, a each paragraph will appear as one long unwrapped line, with no way to read the whole line, because no horizontal bar is created. I haven't found anything about this in either

How does IDLE do it?

2011-02-10 Thread Richard D. Moores
I recently wrote some code that prints information about the 'jukugo' used in Japanese newspaper articles. A jukugo is a Japanese word written with at least 2 kanji. An example of a 2-kanji jukugo is 危機 (kiki -- crisis). I found that I could not use my usual IDE to render the Japanese correctly in

Re: easy question on parsing python: is not None

2010-08-06 Thread Richard D. Moores
On Thu, Aug 5, 2010 at 16:15, Rhodri James rho...@wildebst.demon.co.uk wrote: On Thu, 05 Aug 2010 17:07:53 +0100, wheres pythonmonks wherespythonmo...@gmail.com wrote: You're not testing for equivalence there, you're testing for identity.  is and is not test whether the two objects concerned

Re: easy question on parsing python: is not None

2010-08-06 Thread Richard D. Moores
On Fri, Aug 6, 2010 at 01:32, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: Richard D. Moores a écrit : On Thu, Aug 5, 2010 at 16:15, Rhodri James rho...@wildebst.demon.co.uk wrote: On Thu, 05 Aug 2010 17:07:53 +0100, wheres pythonmonks wherespythonmo...@gmail.com

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread Richard D. Moores
On Thu, Aug 5, 2010 at 18:47, Philip Semanchuk phi...@semanchuk.com wrote: it's just a question of whether or not the module in question exposes any kind of a version attribute. There's no standard, unfortunately. The most popular convention seems to be via an attribute called __version__,

How to get many places of pi from Machin's Equation?

2010-01-09 Thread Richard D. Moores
Machin's Equation is 4 arctan (1/5) - arctan(1/239) = pi/4 Using Python 3.1 and the math module: from math import atan, pi pi 3.141592653589793 (4*atan(.2) - atan(1/239))*4 3.1415926535897936 (4*atan(.2) - atan(1/239))*4 == pi False abs((4*atan(.2) - atan(1/239))*4) - pi

Re: How to get many places of pi from Machin's Equation?

2010-01-09 Thread Richard D. Moores
On Sat, Jan 9, 2010 at 07:57, Mark Dickinson dicki...@gmail.com wrote: On Jan 9, 11:31 am, Richard D. Moores rdmoo...@gmail.com wrote: Machin's Equation is 4 arctan (1/5) - arctan(1/239) = pi/4 [...] Is there a way in Python 3.1 to calculate pi to greater accuracy using Machin's Equation