|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2012 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a structure to hold the data for a speed dial page. |
|
8 """ |
|
9 |
|
10 |
|
11 class Page(object): |
|
12 """ |
|
13 Class to hold the data for a speed dial page. |
|
14 """ |
|
15 def __init__(self, url="", title="", broken=False): |
|
16 """ |
|
17 Constructor |
|
18 |
|
19 @param url URL of the page (string) |
|
20 @param title title of the page (string) |
|
21 """ |
|
22 self.url = url |
|
23 self.title = title |
|
24 self.broken = broken |
|
25 |
|
26 def __eq__(self, other): |
|
27 """ |
|
28 Public method implementing the equality operator. |
|
29 |
|
30 @param other reference to the other page object (Page) |
|
31 @return flag indicating equality (boolean) |
|
32 """ |
|
33 return self.title == other.title and \ |
|
34 self.url == other.url |