assignment to __class__ (was Re: Copy constructors)

Andrew Kuchling akuchlin at
Mon Aug 13 23:14:39 CEST 2001

"Alex Martelli" <aleaxit at> quoted:
> Can we expect variable declarations a few minor releases from
> now, then?  That would presumably be consistent with the new
> focus on protecting typical users from themselves.

It also seems unlikely that newbies run into this problem much,
because assigning __class__ is unlikely to be done by accident, and
because people coming from C++ don't expect that to even be possible.
I can't recall very many people asking about class reassignment tricks

> "Guido van Rossum" <guido at> wrote in message
> news:cpzo94dqvy.fsf at
> > And all I'm trying to do is to make those things safer.  A chainsaw is
> > a great tool -- and also very dangerous.  Should we forbid the use of
> > chainsaws?  Of course not.  Should we try to make them safer by adding
> > protective devices?  Of course we should!

A few weeks ago there was an article in the _Washington Post_ about
someone who's invented a safety device for table saws.  It somehow
detects if the user is touching the blade (the article implies it was
through the conductivity of human flesh -- perhaps a current flows
when a finger completes the circuit) and stops the blade within a few
milliseconds, faster than the pain would travel from your finger to
your brain.  A standard demonstration is to stick a hot dog into the
table saw's blade; the blade stops so quickly that the hot dog is only

The problem is that he can't find manufacturers who want to include
it.  The device costs $150, which is unacceptably high for a low-end
table saw that costs $300 now.  Manufacturers could add it to their
high-end $3000 models, but then they might be sued by someone injured
on a low-end saw because a safety device existed but wasn't available
to them.  So they're simply not adding the device at all.

Moral: Additional safety has costs, and sometimes that cost is too
high to pay.  :)


More information about the Python-list mailing list