<s> """<STR_LIT>""" <EOL> import ast <EOL> from traits . api import Any , HasTraits , Instance , Int , Str <EOL> from . namespace import Namespace <EOL> class Function ( Namespace ) : <EOL> """<STR_LIT>""" <EOL> namespace = Instance ( Namespace ) <EOL> lineno = Int <EOL> name = Str <EOL> doc = Any <EOL> def __str__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return '<STR_LIT>' % ( self . name , self . lineno ) <EOL> class FunctionFactory ( HasTraits ) : <EOL> """<STR_LIT>""" <EOL> def from_ast ( self , namespace , node ) : <EOL> """<STR_LIT>""" <EOL> function = Function ( <EOL> namespace = namespace , <EOL> lineno = node . lineno , <EOL> name = node . name , <EOL> doc = ast . get_docstring ( node , clean = False ) <EOL> ) <EOL> return function </s>
