Librenix  
(Show all Python articles . . .
)  
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Python Generator Tricks

Up
vote
Down

Cool stuff you can do with Python...
The Python programming language's support for generators is described in PEP 255. This article demonstrates a few simple programs which make use of this feature to do some fun stuff like filtering out prime numbers, representing an `infinite' series expansion in a finite way, applying the Euler `accelerator' to make a series converge faster etc. Many of the programs which I describe here have been taken from `test_generators.py' which is available with the Python source distribution.
 read more | mail this link | score:6543 | -Ray, April 1, 2004
More Programming articles...

Buy Abstract Art Canvas Prints

Selected articles

Testing the Digital Ocean $5 Cloud Servers with an MMORPG

How to install Ubuntu Linux on the decTOP SFF computer

Space Tyrant: A threaded C game project: First Code

Hacker Haiku

Shadow.sh: A simple directory shadowing script for Linux

The life cycle of a programmer

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin