In article <00b967e1$0$15623$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
>Nice work! But I have a question...
>
>On Mon, 21 Dec 2009 20:40:40 +, Albert van der Horst wrote:
>
>> def pi4():
>> ' Calculate pi by a 5th order process, with favorable stop
>> criterion'
>> precis
On Tue, 22 Dec 2009 04:04:56 +, Albert van der Horst wrote:
> In article <00b967e1$0$15623$c3e8...@news.astraweb.com>, Steven D'Aprano
> wrote:
>>Nice work! But I have a question...
>>
>>On Mon, 21 Dec 2009 20:40:40 +, Albert van der Horst wrote:
>>
>>> def pi4():
>>> ' Calculate pi
En Mon, 21 Dec 2009 17:40:40 -0300, Albert van der Horst
escribió:
In article ,
Albert van der Horst wrote:
In article
,
Mark Dickinson wrote:
After a cup of coffee, it's much clearer: this just comes from the
Taylor series for arcsin(x), applied to x = 1/2 to get asin(1/2) =
pi/6.
Nice work! But I have a question...
On Mon, 21 Dec 2009 20:40:40 +, Albert van der Horst wrote:
> def pi4():
> ' Calculate pi by a 5th order process, with favorable stop
> criterion'
> precision = 10e-20
Why do you say 10e-20 instead of 1e-19?
--
Steven
--
http://mail.pytho
In article ,
Albert van der Horst wrote:
>In article ,
>Mark Dickinson wrote:
>>On Dec 11, 10:30=A0am, Mark Dickinson wrote:
>>> > It looks like an infinite series with term `t`, where`n` =3D (2k-1)^2
>>> > and `d` =3D d =3D 4k(4k+2) for k =3D 1... Does it have a name?
>>>
>>> Interesting. =A0
In article ,
Mark Dickinson wrote:
>On Dec 11, 10:30=A0am, Mark Dickinson wrote:
>> > It looks like an infinite series with term `t`, where`n` =3D (2k-1)^2
>> > and `d` =3D d =3D 4k(4k+2) for k =3D 1... Does it have a name?
>>
>> Interesting. =A0So the general term here is
>> 3 * (2k choose k) /
On Dec 11, 8:16 am, Anh Hai Trinh wrote:
> I'm just curious which formula for pi is given here: docs.python.org/library/decimal.html#recipes>?
>
> def pi():
> """Compute Pi to the current precision.
>
> >>> print pi()
> 3.141592653589793238462643383
>
> """
> getcontext().prec
On Dec 11, 10:30 am, Mark Dickinson wrote:
> > It looks like an infinite series with term `t`, where`n` = (2k-1)^2
> > and `d` = d = 4k(4k+2) for k = 1... Does it have a name?
>
> Interesting. So the general term here is
> 3 * (2k choose k) / (16**k * (2*k+1)), k >= 0.
>
> I've no idea what its
On Dec 11, 8:16 am, Anh Hai Trinh wrote:
> I'm just curious which formula for pi is given here: docs.python.org/library/decimal.html#recipes>?
>
> def pi():
> """Compute Pi to the current precision.
>
> >>> print pi()
> 3.141592653589793238462643383
>
> """
> getcontext().prec
I'm just curious which formula for pi is given here: ?
def pi():
"""Compute Pi to the current precision.
>>> print pi()
3.141592653589793238462643383
"""
getcontext().prec += 2 # extra digits for intermediate steps
three = Decimal(3) # substitute "three=3.0" for reg
Hi,
I have found some inaccuracy in the Python Library Reference
6.29.5.4 TimedRotatingFileHandler
(http://docs.python.org/lib/node349.html)
1)
it is not really obvious from the documentation the "when" value has
to be in the format "w0", "w1" ... "w6" if "Type of interval" is
defined as a "week
Bruno Desthuilliers wrote:
> In the python shell, typing 'help()' should get you started most
> of the time.
And honestly, it should work all of the time. If it doesn't, file a bug
report. I can't stand it when that doesn't work. Some of us don't do
all of our work with a browser handy, and a net
Tony Burrows wrote:
> Just getting to grips with Python, a great language BUT
> With something like Java I can find the syntax of a method call with no
> problems, how do I do the same with Python?
>
> For example, using MySQLdb or SGMLParser I can see what the available
> methods are with dir, bu
Tony Burrows a écrit :
> Just getting to grips with Python, a great language BUT
> With something like Java I can find the syntax of a method call with no
> problems, how do I do the same with Python?
>
> For example, using MySQLdb or SGMLParser I can see what the available
> methods are with dir,
On Sun, 26 Mar 2006 17:19:35 +0200, Rene Pijlman wrote:
> Tony Burrows:
>>With something like Java I can find the syntax of a method call with no
>>problems, how do I do the same with Python?
>
> The basic syntax is just the name, with parameters in brakcets:
>
>object.method(par1, par2, ...
Tony Burrows wrote:
> Just getting to grips with Python, a great language BUT
> With something like Java I can find the syntax of a method call with no
> problems, how do I do the same with Python?
>
> For example, using MySQLdb or SGMLParser I can see what the available
> methods are with dir, but
Tony Burrows:
>With something like Java I can find the syntax of a method call with no
>problems, how do I do the same with Python?
The basic syntax is just the name, with parameters in brakcets:
object.method(par1, par2, ...)
This is explained in the documentation, of course.
>how do I find
Just getting to grips with Python, a great language BUT
With something like Java I can find the syntax of a method call with no
problems, how do I do the same with Python?
For example, using MySQLdb or SGMLParser I can see what the available
methods are with dir, but how do I find out what paramet
Robert Kern wrote:
> David Bear wrote:
>> I'm confused about how to use the email module in python 2.4.x
>>
>> I'm using python packaged with suse 9.3.
>>
>>>From the module documetation at http://docs.python.org/lib/node597.html I
>> found the following example (items cut):
>>
>> import email
David Bear wrote:
> I'm confused about how to use the email module in python 2.4.x
>
> I'm using python packaged with suse 9.3.
>
>>From the module documetation at http://docs.python.org/lib/node597.html I
> found the following example (items cut):
>
> import email
>
> ...
> msg = email.messag
I'm confused about how to use the email module in python 2.4.x
I'm using python packaged with suse 9.3.
>From the module documetation at http://docs.python.org/lib/node597.html I
found the following example (items cut):
import email
...
msg = email.message_from_file(fp)
..
Yet, when I try thi
21 matches
Mail list logo