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

Charming Python: Generator based state machines

Up
vote
Down

This article shows how to use Python's new generators to simplify state machines and simulate coroutines. It also shows additional patterns for the use of generators, in hopes of bringing readers further into the mindset of "resumable functions." If generators are new to you, you should first review the introduction to simple generators. There are a lot of benefits to using simple generators. In addition to offering more natural ways of expressing the flow of a class of problems, generators can dramatically improve many inefficiencies.
 read more | mail this link | score:6666 | -Debinay, July 19, 2002 (Updated: November 16, 2003)
More Programming articles...

Large Abstract Art with Fine Details and Textures

Selected articles

VPS: Xen vs. OpenVZ

How to install Ubuntu Linux on the decTOP SFF computer

Microsoft to push unlicensed users to Linux

Missing the point of the Mac Mini

Why software sucks

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