Re: Establishing if an Object is Defined

2007-01-10 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi, > > The following code works - > > one = 1 > if one == 1: > ok = 1 > print ok > > but this does not, without exception - > > one = 2 Are you competing for the Most Misleading Name Award(tm) ?-) > if one == 1: > ok = 1 > print ok > > How do I establish be

Re: Establishing if an Object is Defined

2007-01-10 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > Hi, > > The following code works - > > one = 1 > if one == 1: > ok = 1 > print ok > > but this does not, without exception - > > one = 2 > if one == 1: > ok = 1 > print ok > > How do I establish before printing ok if it actually exists so as to > avoid this ex

Establishing if an Object is Defined

2007-01-10 Thread bg_ie
Hi, The following code works - one = 1 if one == 1: ok = 1 print ok but this does not, without exception - one = 2 if one == 1: ok = 1 print ok How do I establish before printing ok if it actually exists so as to avoid this exception? Thanks for your help, Barry. -- http://mail.python.