[Edu-sig] O'Reilly Code Search [beta]

kirby urner kirby.urner at gmail.com
Fri Sep 22 01:24:48 CEST 2006


Code search on Fibonacci...

...we *finally* get to some Pythonic fibonaccis, after slogging
through lots of Java,
on page 6: http://labs.oreilly.com/search.xqy?q=fibonacci&t=code&syn=true&page=6
(but is the page reference static?)

"""
>From Python Cookbook
Chapter 17: Algorithms
By Alex Martelli and David Ascher  ·  Published July 01, 2002  ·  Statistics

Python 2.2's generators provide a wonderful way to implement infinite
sequences, given their intrinsically lazy-evaluation semantics...
"""

Plus there's the recursive version with memory cache (same authors).

Both algorithms are more interesting than Java's for-loopers, which
are likewise trivial in Python.

Kirby

On 9/21/06, Jason Cunliffe <jasonic at nomadics.org> wrote:
> ..search all the code examples in every O'Reilly book
>
> http://labs.oreilly.com/code/
>
> Jason
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>


More information about the Edu-sig mailing list