Did I find the right examples for you? yes no

All Samples(10)  |  Call(9)  |  Derive(0)  |  Import(1)

src/f/i/FinvoiceLib-0.1.13/finvoicelib/elements/element.py   FinvoiceLib(Download)
from decimal import Decimal
from finvoicelib.error import ElementMissingError
from finvoicelib.error import InvalidValue
from finvoicelib.error import UnknownAttributeWarning
from finvoicelib.error import UnknownElementWarning
    def set_text(self, value):
        format = self.attributes['format']
        if len(format) < 1:
            self.errors.append(InvalidValue(self.node, value))
            self.format = 'CCYYMMDD'
            self.text = datetime.date(*time.strptime(value, format)[0:3])
        except (ValueError, TypeError), e:
            self.errors.append(InvalidValue(self.node, value))
            self.text = None
 
            self.text = BusinessID(value)
        except ValueError, e:
            self.errors.append(InvalidValue(self.node, value))
 
 
                self.text = ReferenceNumber(value)
        except ValueError, e:
            self.errors.append(InvalidValue(self.node, value))