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

All Samples(10)  |  Call(7)  |  Derive(0)  |  Import(3)

src/b/a/babbisch-ooc-HEAD/babbisch_ooc/oo.py   babbisch-ooc(Download)
import re
from babbisch.odict import odict
from .names import oocize_name
from .wraplib.ooc import INDENT, DEDENT, Function, Class, Method
 
def make_check_func(errors):
    func = Function(ERROR_CHECKING_FUNCTION, args=odict([('code', 'Int')]), rettype='Int')
    func.code.extend([
        'if(code != 0) {', INDENT,
            'Failure new(match(code) {', INDENT
def make_check_exception():
    cls = Class('Failure', 'Exception')
    init = Method('init~withCode', args=odict([('code', 'String')]))
    init.code.append('super(code)')
    cls.add_member(init)

src/b/a/babbisch-ooc-HEAD/babbisch_ooc/__init__.py   babbisch-ooc(Download)
 
from babbisch.tag import translate, parse_string
from babbisch.odict import odict
 
from .wraplib.codegen import Codegen
        self.properties = defaultdict(dict)
        #: odict {name: codegen} of artificial wrappers getting merged in `run`
        self._codegens = odict()
        #: odict {name: codegen} of *all* codegens.
        self.codegens = odict()
        interface = yaml.load(f)
    # load all objects
    objects = odict()
    for filename in interface.get('Files', ()):
        with open(filename, 'r') as f:

src/b/a/babbisch-ooc-HEAD/babbisch_ooc/wraplib/ooc.py   babbisch-ooc(Download)
from babbisch.odict import odict
from .codegen import CodegenBase, INDENT, DEDENT
 
class Function(CodegenBase):
    def __init__(self, name, modifiers=None, args=None, rettype=None, code=None):
        if modifiers is None:
            modifiers = []
        if args is None:
            args = odict()
    def __init__(self, name, modifiers=None):
        self.name = name
        self.values = odict()
        if modifiers is None:
            modifiers = []