INNER CODE UNIT · Python

find_submodule

ryfeus/lambda-packs · HDF4_H5_NETCDF/source2.7/Cython/Compiler/Main.py:334

    def find_submodule(self, name):
        # Find a top-level module, creating a new one if needed.
        scope = self.lookup_submodule(name)
        if not scope:
            scope = ModuleScope(name,
                parent_module = None, context = self)
            self.modules[name] = scope
        return scope

    def parse(self, source_desc, scope, pxd, full_module_name):
        if not isinstance(source_desc, FileSourceDescriptor):
            raise RuntimeError("Only file sources for code supported")
        source_filename = source_desc.filename
        scope.cpp = self.cpp
        # Parse the given source file and return a parse tree.
        num_errors = Errors.num_errors
        try:
            with Utils.open_source_file(source_filename) as f:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…