Exemplo n.º 1
0
 def __init__(self, Try, Catch=None, Finally=None, Else=None):
     self._try_block = macros.CodeBlock(Try)
     self._catch_block = None
     if Catch is not None:
         if not isinstance(Catch, list):
             Catch = [Catch]
         self._catch_block = [CatchBlock(**c) for c in Catch]
     self._finally_block = (None if Finally is None else
                            macros.CodeBlock(Finally))
     self._else_block = (None if Else is None else macros.CodeBlock(Else))
Exemplo n.º 2
0
 def __init__(self, With=None, As=None, Do=None):
     if With is not None and not isinstance(With, list):
         With = [With]
     self._with = With
     self._as = As
     self._code_block = None if Do is None else macros.CodeBlock(Do)