Re: interesting exercise

2007-05-07 Thread sherry
On May 8, 9:31 am, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Mon, 07 May 2007 20:45:52 -0700, Michael Tobis wrote:
> > I have a reasonably elegant solution but it's a bit verbose (a couple
> > dozen lines which I'll post later if there is interest). Is there some
> > clever Pythonism I didn't spot?
>
> Peering into my crystal ball, I see that your algorithm does the wrong
> thing, and contains bugs too. You certainly don't need to partion the
> sequence into three sub-sequences, or do that trick with the metaclass,
> and it is more efficient to use list.extend() than sum.
>
> Hang on... stupid crystal ball... that's somebody else's code. Maybe you
> should just post your code here, so we can look at it?
>
> In the meantime, here's a simple generator to do permutations with
> repetition:
>
> def permute_with_repetitions(seq):
> if len(seq) <= 1:
> yield list(seq)
> else:
> for i, item in enumerate(seq):
> for tail in permute_with_repetitions(seq[:i] + seq[i+1:]):
> yield [item] + tail
>
> It doesn't do a test for the sequence containing duplicates, and I leave
> it as anexerciseto do selections of fewer items.
>
> --
> Steven.

Dear Steven
 I ran into your message quite accidentally while researching about
some details on 'Exercise' and thought of sharing some of my
findings.
I've read at 'http://www.medical-health-care-information.com/Health-
living/exercise/index.asp
that Swimming, cycling, jogging, skiing, aerobic dancing, walking or
any of dozens of other activities can help your heart. Whether it's
included in a structured exercise program or just part of your daily
routine, all physical activity adds up to a healthier heart.
 I hope the above is of some help to you as well. Regards, Sherrybove.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Division issue with 3.8.2 on AIX 7.1

2020-06-03 Thread Sherry L. West
I need off this list please. I don’t even have this.

On Wed, Jun 3, 2020 at 11:30 PM Albert Chin <
[email protected]> wrote:

> On Wed, Jun 03, 2020 at 08:11:17PM -0400, Dennis Lee Bieber wrote:
> > On Tue, 2 Jun 2020 12:26:16 -0500, Albert Chin
> >  declaimed the following:
> >
> > >I've built Python 3.8.2 on AIX 5.2, 5.3, 6.1, and 7.1. I am seeing
> > >different results for the following Python program:
> > >  $ python3 -c "eps = 2.0 ** -53.0; tiny = 2.0 ** -1022.0; \
> > >print ((1.0 - eps) / tiny * 4.0)"
> > >
> > >I get the correct result, 1.7976931348623157e+308, on AIX 5.2, 5.3,
> > >and 6.1. But, on 7.1, I get "inf".
> > >
> > >Anyone know where can I look in the Python source code to investigate
> > >this?
> >
> > Have you considered that it might be something in an underlying C
> > library (especially for the double-precision exponentiation)?
>
> On Wed, Jun 03, 2020 at 08:44:47PM -0700, Miki Tebeka wrote:
> > > Anyone know where can I look in the Python source code to investigate
> > > this?
> >
> > Probably around
> > https://github.com/python/cpython/blob/master/Objects/floatobject.c
>
> Thanks to both of you. I applied some updated OS patches and the
> problem went away.
>
> --
> albert chin ([email protected])
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 

Mrs. Sherry West
Owens Cross Roads Elementary
-- 
https://mail.python.org/mailman/listinfo/python-list