def StyleFactory(style_elm):
 style_cls = {WD_STYLE_TYPE.PARAGRAPH: _ParagraphStyle, WD_STYLE_TYPE.CHARACTER: _CharacterStyle, WD_STYLE_TYPE.TABLE: _TableStyle, WD_STYLE_TYPE.LIST: _NumberingStyle}[style_elm.type]
 return style_cls(style_elm)

def StyleFactory ( style_elm ) : style_cls = { WD_STYLE_TYPE . PARAGRAPH : _ParagraphStyle , WD_STYLE_TYPE . CHARACTER : _CharacterStyle , WD_STYLE_TYPE . TABLE : _TableStyle , WD_STYLE_TYPE . LIST : _NumberingStyle } [ style_elm . type ] return style_cls ( style_elm )
return a style object of the appropriate |basestyle| subclass .