gensaschema._symbols module

Symbol management

Symbol management.

Copyright

Copyright 2010 - 2019 André Malo or his licensors, as applicable

License

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

exception gensaschema._symbols.SymbolException

Symbol error

__module__ = 'gensaschema._symbols'
__weakref__

list of weak references to the object (if defined)

class gensaschema._symbols.Symbols(symbols=None, imports=None)

Symbol table

IVariables
_symbolsdict

Symbols

imports_Imports

Import container

types_Types

Type container

__contains__(name)

Check symbol table entry

Parameters
namestr

Symbol identifier

Return

The symbol

Rtype

str

Exceptions
  • KeyError : Symbol not found

__delitem__(name)

Remove symbol entry if available

__dict__ = mappingproxy({'__module__': 'gensaschema._symbols', '__doc__': '\n Symbol table\n\n :IVariables:\n `_symbols` : ``dict``\n Symbols\n\n `imports` : `_Imports`\n Import container\n\n `types` : `_Types`\n Type container\n ', '__init__': <function Symbols.__init__>, '__delitem__': <function Symbols.__delitem__>, '__setitem__': <function Symbols.__setitem__>, '__getitem__': <function Symbols.__getitem__>, '__contains__': <function Symbols.__contains__>, '__iter__': <function Symbols.__iter__>, '__dict__': <attribute '__dict__' of 'Symbols' objects>, '__weakref__': <attribute '__weakref__' of 'Symbols' objects>})
__getitem__(name)

Get symbol table entry

Parameters
namestr

Symbol identifier

Return

The symbol

Rtype

str

Exceptions
  • KeyError : Symbol not found

__init__(symbols=None, imports=None)

Initialization

Parameters
symbolsdict

Initial symbols

__iter__()

Make item iterator

Return

The iterator

Rtype

iterable

__module__ = 'gensaschema._symbols'
__setitem__(name, symbol)

Set symbol table entry

Parameters
namestr

Symbol identifier

symbolstr

Symbol

Exceptions
  • SymbolException : Symbol could not be set because of some conflict

__weakref__

list of weak references to the object (if defined)