Reference equality for dictionaries in Python

added by DotNetKicks
8/16/2021 5:19:56 PM

474 Views

Implementing a unit of work in Python can be an interesting challenge. Consider the following code: This is about as simple a code as possible, to associate a tag to an object, right? However, this code will fail for the following scenario: You'll get a lovely: "TypeError: unhashable type: 'Item'" when you try this.


0 comments