MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / coerce_iterable

Method coerce_iterable

bitcoin/core/script.py:548–550  ·  view source on GitHub ↗
(iterable)

Source from the content-addressed store, hash-verified

546 return super(CScript, cls).__new__(cls, value)
547 else:
548 def coerce_iterable(iterable):
549 for instance in iterable:
550 yield cls.__coerce_instance(instance)
551 # Annoyingly on both python2 and python3 bytes.join() always
552 # returns a bytes instance even when subclassed.
553 return super(CScript, cls).__new__(cls, b''.join(coerce_iterable(value)))

Callers

nothing calls this directly

Calls 1

__coerce_instanceMethod · 0.80

Tested by

no test coverage detected