Re: (not really) randon ideas
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: (not really) randon ideas

From: Marc 'BlackJack' Rintsch <bj_666@gmx.net>
Date: Sat Mar 25 2006 - 22:57:48 CET

In <1143320266.676215.253250@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
Received on Sun Apr 30 21:11:26 2006