Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
icalendar.prop.vFrequency Class Reference

List of all members.

Public Member Functions

def __init__
def ical
def from_ical
def __str__

Public Attributes


Static Public Attributes

tuple frequencies
tuple from_ical = staticmethod(from_ical)

Detailed Description

A simple class that catches illegal values.
>>> f = vFrequency('bad test')
Traceback (most recent call last):
ValueError: Expected frequency, got: BAD TEST
>>> vFrequency('daily').ical()
>>> vFrequency('daily').from_ical('MONTHLY')

Definition at line 776 of file

Constructor & Destructor Documentation

def icalendar.prop.vFrequency.__init__ (   self,

Definition at line 799 of file

00800     def __init__(self, *args, **kwargs):
00801         str.__init__(self, *args, **kwargs)
00802         if not self in vFrequency.frequencies:
00803             raise ValueError, 'Expected frequency, got: %s' % self
00804         self.params = Parameters()

Member Function Documentation

Definition at line 816 of file

00817     def __str__(self):
00818         return self.ical()

Here is the call graph for this function:

Definition at line 808 of file

00809     def from_ical(ical):
00810         "Parses the data format from ical text format"
00811         try:
00812             return vFrequency(ical.upper())
00813         except:
            raise ValueError, 'Expected weekday abbrevation, got: %s' % ical

Definition at line 805 of file

00806     def ical(self):
00807         return self.upper()

Here is the caller graph for this function:

Member Data Documentation

Initial value:

Definition at line 789 of file

tuple icalendar.prop.vFrequency.from_ical = staticmethod(from_ical) [static]

Definition at line 814 of file

Definition at line 803 of file

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