Pythonwin attribute expansion

Howard B. Golden hgolden at my-deja.com
Wed Jul 19 18:28:51 EDT 2000


This is about Pythonwin build 132 and Python 1.5.2.

See the code test below.  I define a superclass "Super" and a
subclass "Sub" of "Super".  I create an instance of "Sub" named "s".

Using the Pythonwin interactive window's attribute expansion, when I
type "s." I get a pop-up showing the variables of both "Sub"
and "Super", but only the methods of "Sub" (e.g. "m3" and "m4").  It
seems to me that I should get the methods of "Super" as well.  Is this
a bug, feature, or something I can control?

Here is the specific test code:

class Super:

    def __init__(self):
        self.v1 = 0
        self.v2 = 0

    def m1(self,a):
        self.v1 = a

    def m2(self,a):
        self.v2 = a

class Sub(Super):

    def __init__(self):
        Super.__init__(self)
        self.v3 = 0
        self.v4 = 0

    def m3(self,a):
        self.v3 = a

    def m4(self,a):
        self.v4 = a

s = Sub()


--
Howard B. Golden


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list