![]() |
Python_2
1.0
|
Class for holding an address book. More...
Public Member Functions | |
def | __init__ (self) |
Constructor. More... | |
def | putPhone (self, nome, phones=None, addr='') |
Associates new phones and an address to the given name. More... | |
def | getPhone (self, nome, index) |
Retrieves the index-th phone of a given contact. More... | |
def | getAddr (self, nome) |
Retrieves the address of a given contact. More... | |
def | __eq__ (self, other) |
Compares two agendas. More... | |
def | remContact (self, nome) |
Removes a given contact from the address book. More... | |
def | __repr__ (self) |
Used to print a human readable presentation of an object. More... | |
def | __str__ (self) |
For printing an address book x by using just print x. More... | |
Public Attributes | |
dic | |
Dictionary for associating a contact name to a personalData object. More... | |
Class for holding an address book.
def _01d_Agenda.Agenda.__init__ | ( | self | ) |
Constructor.
Just creates an empty dictionary.
def _01d_Agenda.Agenda.__eq__ | ( | self, | |
other | |||
) |
Compares two agendas.
References _01b_Agenda.Agenda.dic, and _01d_Agenda.Agenda.dic.
def _01d_Agenda.Agenda.__repr__ | ( | self | ) |
Used to print a human readable presentation of an object.
In this case, it prints the contact name and his personal data.
References _01b_Agenda.Agenda.dic, and _01d_Agenda.Agenda.dic.
def _01d_Agenda.Agenda.__str__ | ( | self | ) |
For printing an address book x by using just print x.
Each line is made up of a name followed by its corresponding personal data. Names are listed in alphabetical order.
References _01b_Agenda.Agenda.dic, and _01d_Agenda.Agenda.dic.
def _01d_Agenda.Agenda.getAddr | ( | self, | |
nome | |||
) |
Retrieves the address of a given contact.
nome | contact name. |
References _01b_Agenda.Agenda.dic, and _01d_Agenda.Agenda.dic.
def _01d_Agenda.Agenda.getPhone | ( | self, | |
nome, | |||
index | |||
) |
Retrieves the index-th phone of a given contact.
nome | contact name. |
index | selects a certain phone from the contact phone list. |
References _01b_Agenda.Agenda.dic, and _01d_Agenda.Agenda.dic.
def _01d_Agenda.Agenda.putPhone | ( | self, | |
nome, | |||
phones = None , |
|||
addr = '' |
|||
) |
Associates new phones and an address to the given name.
nome | contact name. |
phones | a personalData or the contact phone list. |
addr | contact address. |
References _01b_Agenda.Agenda.dic, and _01d_Agenda.Agenda.dic.
def _01d_Agenda.Agenda.remContact | ( | self, | |
nome | |||
) |
Removes a given contact from the address book.
nome | contact name. |
References _01b_Agenda.Agenda.dic, and _01d_Agenda.Agenda.dic.
_01d_Agenda.Agenda.dic |
Dictionary for associating a contact name to a personalData object.
Referenced by _01d_Agenda.Agenda.__eq__(), _01d_Agenda.Agenda.__repr__(), _01d_Agenda.Agenda.__str__(), _01d_Agenda.Agenda.getAddr(), _01d_Agenda.Agenda.getPhone(), _01d_Agenda.Agenda.putPhone(), and _01d_Agenda.Agenda.remContact().