From: <bc...@wo...> - 2001-05-28 16:23:04
|
[Ronald_Male] >I have the following situation, which strikes me as bizarre: I have been unable to reproduce the problem with just your example (included below). OTOH case-sensitive import doesn't work right (when compared to all versions of CPython) on case-insensitive filesystems. If the problems still exists, please inform us of your OS / filesystem. You can also try and see if it helps to remove the $py.class files. regards, finn > > file Ab.py: > --------------- > class AB : > > def handleCommand (self, cmd) : > print "AB.handleCommand()" > > >file fred.py: >---------------- >from AB import AB > >class fred (AB) : > > def handleCommand (self, cmd) : > print "fred.handleCommand()" > > >file C.py: > >from AB import AB >from fred import fred > >class C (fred) : > > def handleCommand (self, cmd) : > if blahBlah : <<========= is false > fred.handleCommand(self, cmd) > else : > AB.handleCommand(self, cmd) > > >Ok. Everything has been running fine for "months"; I see >"AB.handleCommand()" in >the output, just as is desired. > >Today I just happened to notice that module AB was used in the import >statements and not module Ab. I'm a freak about details, so I changed >the imports to say module Ab and not AB. Now the code breaks with a >traceback >saying: "TypeError: unbound method must be called with class instance 1st >argument" > > I changed the imports back >to say module AB, and all works again. > >What is happening - my brain feels like it's leaking. |