OpenQuizz
Une application de gestion des contenus pédagogiques
ETags Class Reference
Inheritance diagram for ETags:
Collaboration diagram for ETags:

Public Member Functions

def __init__ (self, strong_etags=None, weak_etags=None, star_tag=False)
 
def as_set (self, include_weak=False)
 
def is_weak (self, etag)
 
def is_strong (self, etag)
 
def contains_weak (self, etag)
 
def contains (self, etag)
 
def contains_raw (self, etag)
 
def to_header (self)
 
def __call__ (self, etag=None, data=None, include_weak=False)
 
def __bool__ (self)
 
def __str__ (self)
 
def __iter__ (self)
 
def __contains__ (self, etag)
 
def __repr__ (self)
 

Data Fields

 star_tag
 

Detailed Description

A set that can be used to check if one etag is present in a collection
of etags.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  strong_etags = None,
  weak_etags = None,
  star_tag = False 
)

Member Function Documentation

◆ __bool__()

def __bool__ (   self)

◆ __call__()

def __call__ (   self,
  etag = None,
  data = None,
  include_weak = False 
)

◆ __contains__()

def __contains__ (   self,
  etag 
)

◆ __iter__()

def __iter__ (   self)

◆ __repr__()

def __repr__ (   self)

◆ __str__()

def __str__ (   self)

◆ as_set()

def as_set (   self,
  include_weak = False 
)
Convert the `ETags` object into a python set.  Per default all the
weak etags are not part of this set.

◆ contains()

def contains (   self,
  etag 
)
Check if an etag is part of the set ignoring weak tags.
It is also possible to use the ``in`` operator.

◆ contains_raw()

def contains_raw (   self,
  etag 
)
When passed a quoted tag it will check if this tag is part of the
set.  If the tag is weak it is checked against weak and strong tags,
otherwise strong only.

◆ contains_weak()

def contains_weak (   self,
  etag 
)
Check if an etag is part of the set including weak and strong tags.

◆ is_strong()

def is_strong (   self,
  etag 
)
Check if an etag is strong.

◆ is_weak()

def is_weak (   self,
  etag 
)
Check if an etag is weak.

◆ to_header()

def to_header (   self)
Convert the etags set into a HTTP header string.

Field Documentation

◆ star_tag

star_tag

The documentation for this class was generated from the following file: