Copy constructors
Jeff Shannon
jeff at ccvcorp.com
Mon Aug 13 16:39:10 EDT 2001
Erik Max Francis wrote:
> Ng Pheng Siong wrote:
>
> > self.state = 1 - self.state
> >
> > ;-)
>
> Why not just
>
> self.state = not self.state
>
Because these constructs are limited to representing only two states (0
and 1), whereas the original construct was easily expandable to an
arbitrary number of states, even though only two were shown for example
purposes.
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list