Ejemplo n.º 1
0
    def __init__(self, str_src = None):
        """
                DStringBOD.__init__

		        the three following attributes have been created by the call to
				dchars.py::new_dstring() :

                self.iso639_3_name             : (str)
                self.transliteration_method    : (str)
                self.options                   : (dict)
        """
        DStringMotherClass.__init__(self)

        # internal structure(s) corresponding to self's content :
        # Should be initialized by self.init_from_transliteration() or
        # by self.init_from_str().
        #
        # We can't set self.istructs to an empty ListOfInternalStructures object,
        # since this objects needs option(s) to be initialized.
        self.istructs = None

        self.are_the_options_valid()

        # Pylint can't know that <self> has an 'options' member
        # created when <self> has been initialized by new_dstring() :
        # pylint: disable=E1101
        # -> "Instance of 'DStringBOD' has no 'options' member"
        if self.options["look up in the buffers"] == 'yes' and not bod_buffer.BUFFER_LOADED:
            bod_buffer.BUFFER_LOADED = self.load_the_buffers()

        if str_src is not None:
            self.init_from_str(str_src)
Ejemplo n.º 2
0
    def __init__(self, str_src = None):
        """
                DStringLAT.__init__

		        the three following attributes have been created by the call to
				dchars.py::new_dstring() :

                self.iso639_3_name             : (str)
                self.transliteration_method    : (str)
                self.options                   : (dict)
        """
        DStringMotherClass.__init__(self)

        if str_src is not None:
            self.init_from_str(str_src)