Copy constructors

Ng Pheng Siong ngps at madcap.dyndns.org
Tue Aug 14 10:46:11 EDT 2001


According to Erik Max Francis  <max at alcyone.com>:
> Ng Pheng Siong wrote:
> >     self.state = 1 - self.state
> 
> Why not just 
> 
> 	self.state = not self.state

Good point. "x = 1 - x" was what I used back in the days when I first
encountered programming and Basic. Does "x = not x" work in Basic? I no
longer remember... (Presumably so.)


-- 
Ng Pheng Siong <ngps at post1.com> * http://www.post1.com/home/ngps

Quidquid latine dictum sit, altum viditur.



More information about the Python-list mailing list