Issue438108

classification
Title: __getitem__ called when it shouldn't?
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pedronis Nosy List: bckfnn, mlh, pedronis
Priority: normal Keywords: test failure causes

Created on 2001-07-03.01:53:16 by mlh, last changed 2001-07-18.15:43:48 by pedronis.

Files
File name Uploaded Description Edit Remove
__init__.py mlh, 2001-07-03.01:53:17 The script
Messages
msg334 (view) Author: Magnus Lie Hetland (mlh) Date: 2001-07-03.01:53:16
When executing the attached script, it looped infinitely in Jython,
but worked fine on other platforms. Or, rather - the attached
script is a "fixed" version. The line which says

   backend = self.__dict__['__try_to_get']('%sgui' % name)

originally was

   backend = self.__try_to_get('%sgui' % name)

The problem is that self.__try_to_get triggered __getitem__ which,
again, triggered the method in which the above line was found.
I cannot see any reason why __getitem__ should be triggered,
since the method __try_to_get exists, and should therefore be
used directly... Right?
msg335 (view) Author: Finn Bock (bckfnn) Date: 2001-07-03.22:26:02
Logged In: YES 
user_id=4201

I think the title should be about __getattr__, not 
__getitem__. 

Added as test296. Problem is caused the "import imp" inside 
the class.
msg336 (view) Author: Samuele Pedroni (pedronis) Date: 2001-07-10.12:40:00
Logged In: YES 
user_id=61408

Got how to solve that, will need another major fix of import
logic.
msg337 (view) Author: Samuele Pedroni (pedronis) Date: 2001-07-18.15:43:48
Logged In: YES 
user_id=61408

fixed through import logic rework.
History
Date User Action Args
2001-07-03 01:53:16mlhcreate