[Python-Dev] Consistency questions

M.-A. Lemburg mal@lemburg.com
Thu, 20 Jul 2000 19:13:23 +0200

Paul Prescod wrote:
> #1. Why does can I overwrite the "standard output object" with
> assignment syntax
> sys.stdout=mystdoutobj
> But I have to add a profile function with function syntax:
> sys.setprofile( myprofilefunc )

.set/get APIs usually interface to C flags or variables which
are not meant to be used directly (often due to performance
> #2. Why doesn't dir( obj ) return inherited methods?

Maybe because inherited methods are not local to the object.

Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/