(not really) randon ideas

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sat Mar 25 16:57:48 EST 2006


In <1143320266.676215.253250 at j33g2000cwa.googlegroups.com>, oluoluolu
wrote:

> I have been programming in Python for many years, and I generally have
> run into alot of the same problems repeatedly.
> 
> What is the consensus on these ideas please?
> 
> * enums

There's a cookbook recipe:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413486

And a package in the Chesseshop:

http://cheeseshop.python.org/pypi/enum/0.4.1

> * constants

People tend to write the names of constants all uppercase.  Example::

  ANSWER = 42

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list