Update of /cvsroot/freevo/freevo/lib/pyepg
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4313/lib/pyepg
Modified Files:
program.py
Log Message:
add cmp function
Index: program.py
===================================================================
RCS file: /cvsroot/freevo/freevo/lib/pyepg/program.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** program.py 10 Dec 2004 19:55:28 -0000 1.5
--- program.py 10 Dec 2004 20:45:40 -0000 1.6
***************
*** 56,57 ****
--- 56,70 ----
# TODO: add ratings support (from epgdb)
self.ratings = ''
+
+
+ def __cmp__(self, other):
+ """
+ compare function, return 0 if the objects are identical, 1 otherwise
+ """
+ try:
+ return self.title != other.title or \
+ self.start != other.start or \
+ self.stop != other.stop or \
+ self.channel != other.channel
+ except AttributeError:
+ return 1
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog