[Tutor] Slightly OT: public/private class members
Jerry Jorgenson
jerry@j3iss.com
Fri Feb 14 08:33:35 2003
> So, what's the need/use for private members?
Private members help avoid side effects. If you can't call a
variable/class/data from outside the local scope, then you
must act on it (them) with the defined methods, so bugs are
(theoretically) easier to find and harder to create.
On this subject, why can't Python enforce variable names ( e.g.
use strict), and why are all variables global in scope. These
to "features" are why I don't use Python much.
Jerry
Jerry Jorgenson
jerry@j3iss.com
http://www.j3iss.com/
972-897-1166 (Cell)
972-209-0191 (Page)