473,513 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dictionary membership check failure

Greetings,

I have a dictionary that seems to be misbehaving on a membership
check. This test code:

1: import types
2: assert myDict.__class__ is types.DictionaryType
3: assert (key in myDict.keys()) == (key in myDict)

raises AssertionError on line three. The dictionary items are all of
type (string, function).

There are no threads.

Python version is 2.5.1, I cannot go to 2.5.2 right now because of a
module that we use that depends on 2.5.1 (maya standalone), but does
anyone know if this bug has been fixed in 2.5.2 or if I can give
anyone more information to help fix this bug?

--
Zachary Burns
Aim - Zac256FL
Production Engineer
Zindagi Games
Nov 5 '08 #1
0 865

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1691
by: Blair Hall | last post by:
I would like to determine whether two dictionaries have the same set of keys. Can anyone tell me if I HAVE to sort the key sequences as in this code snippet: # d1, d2 already created k1 = d1.keys() k1.sort() k2 = d2.keys() k2.sort()
9
3283
by: Tim N. van der Leeuw | last post by:
Hi, I'd like to remove keys from a dictionary, which are not found in a specific set. So it's kind of an intersection-operation. I can create a new dictionary, or a loop over all keys and test them for set-membership, but I was wondering if there was a smart way to express this in 1 or 2 concise statements that I'm not aware of. So are...
2
3536
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the custom membership provider fine and removes the security question/answer fields as designated in the custom provider. The problem is that when I...
9
2156
by: Paul Keegstra | last post by:
Hi, I am currently working on an asp.net 2.0 web site that is a replacement of a classic asp web site. The current web site uses a Commerce Server 2002 database for storing user information. It does not currently use any of the Commerce Server 2002 functionality with the exception of the user authentication features. I have written my...
4
1434
by: =?Utf-8?B?U2FsYW1FbGlhcw==?= | last post by:
Hi, I am trying to play with the Survey manager application provided gracefully by Microsoft at "http://msdn.microsoft.com/vstudio/express/sql/samples/" VB team(so many thanks), compiled the win app, added 2 users beside the "thardy" user already shipped with the aplication. I can not pass the Login page, I always get the following message on...
0
2888
by: =?Utf-8?B?TmVpbF9C?= | last post by:
Hi all, I have a problem with a webservice using WSE 3.0. I have a web-service which pulls data from a database and a client which pulls the data from the webservice. I have created a user using the web admin tool and everything works fine. However, I need to run the client application as a windows service and this is where the fun begins....
3
2008
by: Michael Lang | last post by:
Hi there, I have a web application that works fine on my local dev machine. However I'm having less success on my hosting environment. When I detach the database for this site, copy it to my hosting environment and attach it through their interface, I can connect to the database in my hosting environment through the SQL Management...
5
1953
by: Rory Becker | last post by:
Hi All I have a database which has it's own set of tables for users etc I already successfully use the Login control by handling the Authenticate event and checking the suitable values against my own DB. Now I need to use the ChangePassword control but I cannot stop the system from trying to create a database.
0
901
by: Zac Burns | last post by:
Sorry everyone, I found the bug in my code shortly after posting here. For the curious: I was using a QString (pyqt) inadvertently in the lookup. I guess the behavior then would be would be that QStrings hash differently than strings which accounts for the membership check failure, but lists do an equivalency check of some sort (I don't...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3248
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.