Harrison Hill wrote:
> No need - I have the Dictionary definition of recursion here:
>
> Recursion: (N). See recursion.
If you tell a joke, you have to tell it right.
Recursion: (N). See recursion. See also tail recursion.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
sent is not None:
> yield None # This becomes the return value from gen.send()
> yield sent # This is the next value yielded
>i += 1
I think this will serve my purposes.
Thanks everyone for broadening my understanding of generators.
Victor.
--
Victor
n? In my code I was hoping to get
0,1,2,3,4,5,2,6,7 as yield expressions.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
Dan Stromberg wrote:
> You likely want a class variable:
Sounds like an elegant solution. Thanks!
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
ppreciated.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
thods.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
Zooko O'Whielacronx wrote:
> I'm starting to think that one should use Decimals by default and
> reserve floats for special cases.
Only if one has Power6 (or 7) which has hardware support for BCD.
Otherwise you will have slow applications.
Victor.
--
Victor Eijkhout --
2.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
Jerry Hill wrote:
> >>> from __future__ import division
> >>> long1/long2
> 0.5
Beautiful. Thanks so much guys.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
I have two long ints, both too long to convert to float, but their ratio
is something reasonable. How can I compute that? The obvious "(1.*x)/y"
does not work.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern wrote:
> second[first.argsort()]
Really cool. Thanks.
> Ask numpy questions on the numpy mailing list.
I will. I thought that this question would have an answer in a generic
python idiom.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.pyth
this needs to be done as efficiently as possible.
I could use a hand.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
> > My specific question: what does "for x in A" give me when A is a sparse
> > matrix?
>
> Try it and see what you get.
Ah, how do I see what I get? If I print it it looks plausible, but I
don't know how to pull it apart. It doesn't see
from x?
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman/listinfo/python-list
14 matches
Mail list logo