Package cherrypy :: Package lib :: Module http :: Class AcceptElement
[hide private]
[frames] | no frames]

Class AcceptElement

source code

   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 [hide private]
 
__cmp__(self, other) source code

Inherited from HeaderElement: __init__, __str__, __unicode__

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

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

Inherited from HeaderElement: parse

Properties [hide private]
  qvalue
The qvalue, or priority, of this value.

Inherited from object: __class__

Method Details [hide private]

from_str(cls, elementstr)
Class Method

source code 

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

Overrides: HeaderElement.from_str
(inherited documentation)

Property Details [hide private]

qvalue

The qvalue, or priority, of this value.

Get Method:
unreachable.qvalue(self)