Package CedarBackup2 :: Module util :: Class AbsolutePathList
[hide private]
[frames] | no frames]

Class AbsolutePathList

source code

object --+        
         |        
      list --+    
             |    
 UnorderedList --+
                 |
                AbsolutePathList

Class representing a list of absolute paths.

This is an unordered list.

We override the append, insert and extend methods to ensure that any item added to the list is an absolute path.

Each item added to the list is encoded using encodePath. If we don't do this, we have problems trying certain operations between strings and unicode objects, particularly for "odd" filenames that can't be encoded in standard ASCII.

Instance Methods [hide private]
 
append(self, item)
Overrides the standard append method.
source code
 
insert(self, index, item)
Overrides the standard insert method.
source code
 
extend(self, seq)
Overrides the standard insert method.
source code

Inherited from UnorderedList: __eq__, __ge__, __gt__, __le__, __lt__, __ne__

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __getattribute__, __getitem__, __getslice__, __iadd__, __imul__, __init__, __iter__, __len__, __mul__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, count, index, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

append(self, item)

source code 

Overrides the standard append method.

Raises:
  • ValueError - If item is not an absolute path.
Overrides: list.append

insert(self, index, item)

source code 

Overrides the standard insert method.

Raises:
  • ValueError - If item is not an absolute path.
Overrides: list.insert

extend(self, seq)

source code 

Overrides the standard insert method.

Raises:
  • ValueError - If any item is not an absolute path.
Overrides: list.extend