Re: What is Python's answer to Perl 6?

From: Michael Hoffman (m.h.3.9.1.without.dots.at.cam.ac.uk_at_example.com)
Date: 10/30/04


Date: Sat, 30 Oct 2004 15:34:24 +0100

Reinhold Birkenfeld wrote:
> C. Functions that could be made attributes of lists/sequences
>
> max, min, len, enumerate, sum
>
> But that would require to implement them for all sequence types or
> implement a common basetype 'seq'.

And iterators?

-- 
Michael Hoffman


Relevant Pages

  • Re: What is Pythons answer to Perl 6?
    ... > Reinhold Birkenfeld wrote: ... >> max, min, len, enumerate, sum ... >> But that would require to implement them for all sequence types or ...
    (comp.lang.python)
  • Re: initial stages of scripting
    ... have is a classic example of what's known as a sentinel guarded loop. ... In Ruby it's more natural for these kinds of problems to use a Range ... object and then enumerate across it: ... The 'sum' parameter to the block acts as an accumulator and for each ...
    (comp.lang.ruby)