diff --git a/twisted/internet/address.py b/twisted/internet/address.py
index 6b34b99..e80f460 100644
|
a
|
b
|
|
| 50 | 50 | return hash((self.type, self.host, self.port)) |
| 51 | 51 | |
| 52 | 52 | |
| | 53 | def __getitem__(self, index): |
| | 54 | if (index == 0): |
| | 55 | return self.type |
| | 56 | elif (index == 1): |
| | 57 | return self.host |
| | 58 | elif (index == 2): |
| | 59 | return self.port |
| | 60 | else: |
| | 61 | if isinstance(index, int): |
| | 62 | raise IndexError('Out of bounds key index = %s.' % index) |
| | 63 | else: |
| | 64 | raise TypeError('Invalid index type %s' % type(index)) |
| | 65 | |
| | 66 | |
| 53 | 67 | |
| 54 | 68 | class IPv4Address(_IPAddress): |
| 55 | 69 | """ |