Fix an example in README.md (#423)

This commit is contained in:
Kevin Tewouda 2020-05-13 06:41:15 +02:00 committed by GitHub
parent 692e0ee8ff
commit 4e10222b51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -159,7 +159,7 @@ It is also possible to pack/unpack custom data types. Here is an example for
} }
def decode_datetime(obj): def decode_datetime(obj):
if b'__datetime__' in obj: if '__datetime__' in obj:
obj = datetime.datetime.strptime(obj["as_str"], "%Y%m%dT%H:%M:%S.%f") obj = datetime.datetime.strptime(obj["as_str"], "%Y%m%dT%H:%M:%S.%f")
return obj return obj