Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz/python-cookbook
/ unaryop
Method
unaryop
src/8/implementing_the_visitor_pattern/example.py:97–99 ·
view source on GitHub ↗
(self, node, instruction)
Source
from the content-addressed store, hash-verified
95
self.binop(node,
'DIV'
)
96
97
def
unaryop(self, node, instruction):
98
self.visit(node.operand)
99
self.instructions.append((instruction,))
100
101
def
visit_Negate(self, node):
102
self.unaryop(node,
'NEG'
)
Callers
1
visit_Negate
Method · 0.95
Calls
1
visit
Method · 0.45
Tested by
no test coverage detected