Testing existance of variable
Adam Sampson
ats1 at ukc.ac.uk
Sun Oct 15 09:08:28 EDT 2000
More information about the Python-list mailing list
Sun Oct 15 09:08:28 EDT 2000
- Previous message (by thread): python docs in info format
- Next message (by thread): Testing existance of variable
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steve George <python-group at rascal.remove_this_bit.org> writes: > if os.environ.has_key('REMOTE_HOST') or os.environ.has_key('REMOTE_ADDR'): > remote_id = os.environ['REMOTE_HOST'] or os.environ['REMOTE_ADDR'] Why not: if os.environ.has_key('REMOTE_HOST'): remote_id = os.environ['REMOTE_HOST'] elif os.environ.has_key('REMOTE_ADDR'): remote_id = os.environ['REMOTE_ADDR'] ? -- Adam Sampson azz at gnu.org
- Previous message (by thread): python docs in info format
- Next message (by thread): Testing existance of variable
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list