Why we will use obj$func() often

Greg Ewing greg at cosc.canterbury.ac.nz
Sun Apr 25 23:32:59 EDT 2004


David MacQuigg wrote:
> Python added "read access" to external variables, so they must have
> considered "write access" as well.  I don't know the history, but I
> would guess the reason they didn't allow this is the same as the
> reason they don't allow GOTO.  Yes it is powerful, but it might
> encourage bad programming.  

Actually, it was more that there wasn't any single obvious
way of providing write access that blends in with Python's
"assignment is implicit declaration" flavour. Rather than
pick one at random, it was decided to just provide read
access to begin with and leave anything else to later.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list