'str' object has no attribute 'intersection' and unhashable set
dieter
dieter at handshake.de
Wed Oct 5 03:39:55 EDT 2016
More information about the Python-list mailing list
Wed Oct 5 03:39:55 EDT 2016
- Previous message (by thread): 'str' object has no attribute 'intersection' and unhashable set (Reposting On Python-List Prohibited)
- Next message (by thread): 'str' object has no attribute 'intersection' and unhashable set
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
meInvent bbird <jobmattcon at gmail.com> writes: ... not looking at the details ... "'str' object has not attribute 'intersection'": apparently, something is really a string (an 'str') while you expect it to be a set. "unhashable set": maybe, you try to put a set into another set (or a dict; or somewhere else where hashability is necessary). A "set" itself is unhashable (like many mutable standard data types); you may consider to use "frozenset" in those cases (of course, a "frozenset" is immutable, i.e. cannot be changed after creation).
- Previous message (by thread): 'str' object has no attribute 'intersection' and unhashable set (Reposting On Python-List Prohibited)
- Next message (by thread): 'str' object has no attribute 'intersection' and unhashable set
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list