Problem You’ve tried to add an object into a set and a TypeError: unhashable type: exception was raised. You were probably using a set becase you needed a collection of objects without duplicates. If that was the case, two ways of solving this come to mind Solution Implement the __hash__ method for the parent class of that object as per the guidelines in the Python documentation. Extend the inbuilt data-type list and override it’s append() method:
Background Since back in 2001 when I wrote my first program in C, I thought programming language choice was what determined whether a software project succeeded. Many projects later, it was apparent there was a lot more to it than that. Projects stalled and became incredibly difficult after a certain size, no matter the programming language. So I enrolled in an MSc. in Software Engineering at Heriot-Watt Dubai. I got accepted, flew over there, and got started late 2018.
Interview: What is Software Engineering? Interviewer: Welcome Tim. Me: Thank you, glad to be here. Interviewer: What is Software Engineering? Is it just coding or is there more to it? Me: Software Engineering is the application of Engineering principles to building software. These are principles common to all Engineering disciplines. Interviewer: Ah I see. What are these principles? Me: I set out to find out exactly what was similar between all Engineering disciplines cutting through the jargon and framing for each, and this is what I’ve found:
Programming Languages I’m halfway through my MSc. in Software engineering, and a big part of the training is to help us perceive programming languages as tools in a toolbox. To be learned fast and used as needed for the task at hand. It’s about the people, the problem they need solved, the product, the design, and finally the tools in the toolbox to implement the design and deliver a product that solves the people’s problem.