def _paths_from_assignment(evaluator, expr_stmt):
 for (assignee, operator) in zip(expr_stmt.children[::2], expr_stmt.children[1::2]):
  try:
   assert (operator in ['=', '+='])
   assert (tree.is_node(assignee, 'power', 'atom_expr') and (len(assignee.children) > 1))
   c = assignee.children
   assert ((c[0].type == 'name') and (c[0].value == 'sys'))
   trailer = c[1]
   assert ((trailer.children[0] == '.') and (trailer.children[1].value == 'path'))
   "\n            execution = c[2]\n            assert execution.children[0] == '['\n            subscript = execution.children[1]\n            assert subscript.type == 'subscript'\n            assert ':' in subscript.children\n            "
  except AssertionError:
   continue
  from jedi.evaluate.iterable import py__iter__
  from jedi.evaluate.precedence import is_string
  types = evaluator.eval_element(expr_stmt)
  for types in py__iter__(evaluator, types, expr_stmt):
   for typ in types:
    if is_string(typ):
     (yield typ.obj)

def _paths_from_assignment ( evaluator , expr_stmt ) : for ( assignee , operator ) in zip ( expr_stmt . children [ : : 2 ] , expr_stmt . children [ 1 : : 2 ] ) : try : assert ( operator in [ '=' , '+=' ] ) assert ( tree . is_node ( assignee , 'power' , 'atom_expr' ) and ( len ( assignee . children ) > 1 ) ) c = assignee . children assert ( ( c [ 0 ] . type == 'name' ) and ( c [ 0 ] . value == 'sys' ) ) trailer = c [ 1 ] assert ( ( trailer . children [ 0 ] == '.' ) and ( trailer . children [ 1 ] . value == 'path' ) ) except AssertionError : continue from jedi . evaluate . iterable import py__iter__ from jedi . evaluate . precedence import is_string types = evaluator . eval_element ( expr_stmt ) for types in py__iter__ ( evaluator , types , expr_stmt ) : for typ in types : if is_string ( typ ) : ( yield typ . obj )
extracts the assigned strings from an assignment that looks as follows:: .