You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CBOR format has self-descriptive length, so many of its elements can be placed in sequence, or in a stream. For that I find a generator a useful concept. I had to code it like this,
def ll1generate_cbor_tokens (token, f):
if token is not None:
yield token
try:
while True:
yield cbor.load (f)
except EOFError:
pass
It would be useful to have this supported directly for files, sockets and strings. The behaviour of loads() is even to ignore the extra content, and reveal nothing about the fact that it exists (AFAIK).
The text was updated successfully, but these errors were encountered:
The CBOR format has self-descriptive length, so many of its elements can be placed in sequence, or in a stream. For that I find a generator a useful concept. I had to code it like this,
It would be useful to have this supported directly for files, sockets and strings. The behaviour of
loads()
is even to ignore the extra content, and reveal nothing about the fact that it exists (AFAIK).The text was updated successfully, but these errors were encountered: