#define equivalents and config files
Peter Hansen
peter at engcorp.com
Wed Mar 20 23:43:43 EST 2002
More information about the Python-list mailing list
Wed Mar 20 23:43:43 EST 2002
- Previous message (by thread): #define equivalents and config files
- Next message (by thread): #define equivalents and config files
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Rich Salz wrote: > > > Is there a pythonic way of doing something similiar to Cs #define? > >... are globals the only way to go? > > You can at least make them class attributes > class constants: > pi = 3.14159 > e = 2.71828 > adding your own setattr can serve to make them read-only. That wouldn't help when one needed to change the values... ;-)
- Previous message (by thread): #define equivalents and config files
- Next message (by thread): #define equivalents and config files
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list