From 3257a2b178816eed544cbd019be21db8e68ded10 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 2 Mar 2014 18:40:47 +0200 Subject: [PATCH] Events and tags are now hashable --- pylast.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pylast.py b/pylast.py index bdf35e0..611c605 100644 --- a/pylast.py +++ b/pylast.py @@ -1189,6 +1189,7 @@ class Album(_BaseObject, _Taggable): title = None artist = None username = None + __hash__ = _BaseObject.__hash__ def __init__(self, artist, title, network, username=None): @@ -1359,6 +1360,7 @@ class Artist(_BaseObject, _Taggable): name = None username = None + __hash__ = _BaseObject.__hash__ def __init__(self, name, network, username=None): @@ -1674,6 +1676,8 @@ class Event(_BaseObject): id = None + __hash__ = _BaseObject.__hash__ + def __init__(self, event_id, network): _BaseObject.__init__(self, network) @@ -2265,6 +2269,8 @@ class Tag(_BaseObject): name = None + __hash__ = _BaseObject.__hash__ + def __init__(self, name, network): _BaseObject.__init__(self, network) @@ -2408,6 +2414,7 @@ class Track(_BaseObject, _Taggable): artist = None title = None username = None + __hash__ = _BaseObject.__hash__ def __init__(self, artist, title, network, username=None): @@ -2857,6 +2864,7 @@ class User(_BaseObject): """A Last.fm user.""" name = None + __hash__ = _BaseObject.__hash__ def __init__(self, user_name, network):