projects
/
pycalendar.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
entry: Hash entries by their UID (when possible)
[pycalendar.git]
/
pycalendar
/
entry.py
diff --git
a/pycalendar/entry.py
b/pycalendar/entry.py
index 90e0bac0b060cf64c301abf86b9346fa60bc9a74..315a2284080607f36ca061d45619dc3c966d4a63 100644
(file)
--- a/
pycalendar/entry.py
+++ b/
pycalendar/entry.py
@@
-69,6
+69,13
@@
class Entry (dict):
self.process()
def __hash__(self):
+ if self.type in [
+ 'VEVENT',
+ 'VFREEBUSY',
+ 'VJOURNAL',
+ 'VTODO',
+ ] or 'UID' in self:
+ return hash(_text.unescape(self['UID']))
return id(self)
def __str__(self):