(self, node, frame)
| 1397 | # -- Expression Visitors |
| 1398 | |
| 1399 | def visit_Name(self, node, frame): |
| 1400 | if node.ctx == 'store' and frame.toplevel: |
| 1401 | if self._assign_stack: |
| 1402 | self._assign_stack[-1].add(node.name) |
| 1403 | ref = frame.symbols.ref(node.name) |
| 1404 | |
| 1405 | # If we are looking up a variable we might have to deal with the |
| 1406 | # case where it's undefined. We can skip that case if the load |
| 1407 | # instruction indicates a parameter which are always defined. |
| 1408 | if node.ctx == 'load': |
| 1409 | load = frame.symbols.find_load(ref) |
| 1410 | if not (load is not None and load[0] == VAR_LOAD_PARAMETER and \ |
| 1411 | not self.parameter_is_undeclared(ref)): |
| 1412 | self.write('(undefined(name=%r) if %s is missing else %s)' % |
| 1413 | (node.name, ref, ref)) |
| 1414 | return |
| 1415 | |
| 1416 | self.write(ref) |
| 1417 | |
| 1418 | def visit_NSRef(self, node, frame): |
| 1419 | # NSRefs can only be used to store values; since they use the normal |
nothing calls this directly
no test coverage detected