(cls, schema_name)
return cls(path, modname, sym)
>>> ParsedSchemaName.parse_schema_name('schema')
        ParsedSchemaName(path=None, modname='schema', sym='schema')
        >>> ParsedSchemaName.parse_schema_name('schema:sym')
        ParsedSchemaName(path=None, modname='schema', sym='sym')
        >>> ParsedSchemaName.parse_schema_name('..schema:sym')
        ParsedSchemaName(path='..', modname='schema', sym='sym')
        >>> ParsedSchemaName.parse_schema_name('..schema')
        ParsedSchemaName(path='..', modname='schema', sym='schema')
>>> ParsedSchemaName.parse_schema_name('schema')
        ParsedSchemaName(path=None, modname='schema', sym='schema')
        >>> ParsedSchemaName.parse_schema_name('schema:sym')
        ParsedSchemaName(path=None, modname='schema', sym='sym')
        >>> ParsedSchemaName.parse_schema_name('..schema:sym')
        ParsedSchemaName(path='..', modname='schema', sym='sym')
        >>> ParsedSchemaName.parse_schema_name('..schema')
        ParsedSchemaName(path='..', modname='schema', sym='schema')
>>> ParsedSchemaName . parse_schema_name ( schema ) ParsedSchemaName ( path = None modname = schema sym = schema ) >>> ParsedSchemaName . parse_schema_name ( schema : sym ) ParsedSchemaName ( path = None modname = schema sym = sym ) >>> ParsedSchemaName . parse_schema_name ( .. schema : sym ) ParsedSchemaName ( path = .. modname = schema sym = sym ) >>> ParsedSchemaName . parse_schema_name ( .. schema ) ParsedSchemaName ( path = .. modname = schema sym = schema )
def parse_schema_name(cls, schema_name):
        '''
        >>> ParsedSchemaName.parse_schema_name('schema')
        ParsedSchemaName(path=None, modname='schema', sym='schema')
        >>> ParsedSchemaName.parse_schema_name('schema:sym')
        ParsedSchemaName(path=None, modname='schema', sym='sym')
        >>> ParsedSchemaName.parse_schema_name('..schema:sym')
        ParsedSchemaName(path='..', modname='schema', sym='sym')
        >>> ParsedSchemaName.parse_schema_name('..schema')
        ParsedSchemaName(path='..', modname='schema', sym='schema')
        '''
        m = cls._parse_regex.match(schema_name)
        if not m:
            raise ValueError('invalid schema_name format')

        path = m.group('path') or None
        modname = m.group('modname')
        sym = m.group('sym') or modname
        return cls(path, modname, sym)
def parse_schema_name ( cls , schema_name ) : m = cls . _parse_regex . match ( schema_name ) if not m : raise ValueError ( 'invalid schema_name format' ) path = m . group ( 'path' ) or None modname = m . group ( 'modname' ) sym = m . group ( 'sym' ) or modname return cls ( path , modname , sym )