Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(5)  |  Derive(0)  |  Import(4)

src/w/e/Webware-for-Python-1.1.1/MiddleKit/Core/Klasses.py   Webware-for-Python(Download)
from ModelObject import ModelObject
from Model import Model, ModelError
from Klass import Klass
from Attr import Attr
from MiscUtils import NoDefault
        if not typeName:
            if attrDict['Attribute']:
                raise ModelError("no type specified for attribute '%s'"
                    % attrDict['Attribute'])
            else:
                raise ModelError('type specifier missing')

src/w/e/Webware-for-Python-1.1.1/MiddleKit/Core/ListAttr.py   Webware-for-Python(Download)
    def awakeFromRead(self):
        """Check that the target class and backRefAttr actually exist."""
        # Check that for "list of Foo", Foo actually exists. And,
        # Compute self._targetKlass.
        from Model import ModelError
        self._targetKlass = self.model().klass(self.className(), None)
        if not self._targetKlass:
            raise ModelError('class %s: attr %s:'
        backRefAttr = self._targetKlass.lookupAttr(self.backRefAttrName(), None)
        if backRefAttr is None:
            raise ModelError('class %s: attr %s: cannot locate backref attr'
                ' %s.%s for this list.' % (self.klass().name(), self.name(),
                self.className(), self.backRefAttrName()))

src/w/e/Webware-for-Python-1.1.1/MiddleKit/Core/ObjRefAttr.py   Webware-for-Python(Download)
    def awakeFromRead(self):
        """Check that the target class actually exists."""
        self._targetKlass = self.model().klass(self.targetClassName(), None)
        if not self._targetKlass:
            from Model import ModelError
            raise ModelError('class %s: attr %s:'