Package circuits :: Package web :: Module headers :: Class AcceptElement

Class AcceptElement

   object --+    
            |    
HeaderElement --+
                |
               AcceptElement

An element (with parameters) from an Accept* header's element list.

AcceptElement objects are comparable; the more-preferred object will be "less than" the less-preferred object. They are also therefore sortable; if you sort a list of AcceptElement objects, they will be listed in priority order; the most preferred value will be first. Yes, it should have been the other way around, but it's too late to fix now.

Instance Methods
 
__cmp__(self, other)

Inherited from HeaderElement: __init__, __str__, __unicode__

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

Class Methods
 
from_str(cls, elementstr)
Construct an instance from a string of the form 'token;key=val'.
Static Methods

Inherited from HeaderElement: parse

Properties
  qvalue
The qvalue, or priority, of this value.

Inherited from object: __class__

Method Details

from_str(cls, elementstr)
Class Method

 

Construct an instance from a string of the form 'token;key=val'.

Overrides: HeaderElement.from_str
(inherited documentation)

Property Details

qvalue

The qvalue, or priority, of this value.

Get Method:
unreachable.qvalue(self)