MCPcopy
hub / github.com/jimmysong/programmingbitcoin / op_not

Function op_not

code-ch08/op.py:441–449  ·  view source on GitHub ↗
(stack)

Source from the content-addressed store, hash-verified

439
440
441def op_not(stack):
442 if len(stack) < 1:
443 return False
444 element = stack.pop()
445 if decode_num(element) == 0:
446 stack.append(encode_num(1))
447 else:
448 stack.append(encode_num(0))
449 return True
450
451
452def op_0notequal(stack):

Callers

nothing calls this directly

Calls 2

decode_numFunction · 0.70
encode_numFunction · 0.70

Tested by

no test coverage detected