Package httxlib :: Module httxcompressionset :: Class HttxCompressionSet
[hide private]
[frames] | no frames]

Class HttxCompressionSet

source code

           object --+    
                    |    
httxobject.HttxObject --+
                        |
                       HttxCompressionSet

HttxLib Set with locking semanctics to store the allowed compression values

Instance Methods [hide private]
 
__init__(self, *args)
Constructor.
source code
HttxCompressionSet
__deepcopy__(self, memo)
Deepcopy support.
source code
str
__str__(self)
Conversion to string
source code
 
add(self, elem)
Add a compression type to the set
source code
 
remove(self, elem)
Remove a compression type from the set.
source code
 
discard(self, elem)
Discard a compression type from the set
source code
 
clear(self)
Clear the set
source code
 
update(self, other)
Update the set with another set
source code
str
join(self, sep=', ')
Utility function to return the values in the set as a string separated by sep
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Instance Variables [hide private]
  compressionset
holds the unique values

Inherited from httxobject.HttxObject: lock

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 

Constructor. It delegates construction to the base class HttxObject and initializes the member variables

Parameters:
  • args (list|tuple) - iterable of allowed compression values
Overrides: object.__init__

__deepcopy__(self, memo)

source code 

Deepcopy support.

Parameters:
  • memo (dict) - standard __deepcopy__ parameter to avoid circular references
Returns: HttxCompressionSet
a cloned object

__str__(self)
(Informal representation operator)

source code 

Conversion to string

Returns: str
a string containing the allowed compression types
Overrides: object.__str__

add(self, elem)

source code 

Add a compression type to the set

Parameters:
  • elem (str) - a compression type (like gzip)

remove(self, elem)

source code 

Remove a compression type from the set.

It mimics remove from Python set

Parameters:
  • elem (str) - a compression type (like gzip)

discard(self, elem)

source code 

Discard a compression type from the set

It mimics discard from Python set

Parameters:
  • elem (str) - a compression type (like gzip)

update(self, other)

source code 

Update the set with another set

Parameters:
  • other (set) - another set to use in the update

join(self, sep=', ')

source code 

Utility function to return the values in the set as a string separated by sep

Parameters:
  • sep (str) - separator in the returned string
Returns: str
string composed of the set elements separated by sep