Author kquick
Recipients
Date 2004-10-17.21:55:17
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The attachment contains a script intended to do performance testing
on various types of dictionary keys.  Lambda functions are used to
"generate" a sequence of keys with bound arguments to arrays that are
modified during execution.

Script fails with pop() on empty list error, but examination shows that 
the lambda function from the *previous* call is being used for the 
current call; if proper lambda was used, list would not be empty and
operation should succeed.

Script is large and has been "grown", so it's not very elegant, but either 
I'm missing somewhere where I'm making a stupid mistake or else the
lambda argument to the function call isn't being set properly.  Don't be 
put off by the size of the script; the problem is easily demonstrated and 
fairly clearly understood in just a few minutes of looking at the 
generated stack trace relative to the code.

As it exists, script will fail immediately due to the bug.  If it worked as 
expected, at least 3-4 lines of output should be generated before 
encountering new code that hasn't yet been fully debugged.  New code 
could be removed, but it was left in because some of the complexity of 
core code is due to this latter code, and it doesn't obstruct the primary 
bug, so it can be ignored unless of interest.

python
Python 2.3.3 (#1, May 27 2004, 20:44:16) 
[GCC 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)] on 
linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Thanks for looking at this!
History
Date User Action Args
2007-08-23 14:26:46adminlinkissue1048870 messages
2007-08-23 14:26:46admincreate