Skip to content

Commit

Permalink
improve wording in readme and msgpack.org.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vsergeev committed Oct 19, 2016
1 parent 73ab43d commit 3b980fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Streaming serialization with file-like objects:
>>>
```

Encoding and decoding a raw Ext type:
Serializing and deserializing a raw Ext type:
``` python
>>> # Create an Ext object with type 0x05 and data b"\x01\x02\x03"
... foo = umsgpack.Ext(0x05, b"\x01\x02\x03")
Expand All @@ -79,7 +79,7 @@ b'\x01\x02\x03'
>>>
```

Encoding and decoding application-defined types with Ext handlers:
Serializing and deserializing application-defined types with Ext handlers:
``` python
>>> umsgpack.packb([complex(1,2), datetime.datetime.now()],
... ext_handlers = {
Expand Down Expand Up @@ -339,7 +339,7 @@ If a non-byte-string argument is passed to `umsgpack.unpackb()`, it will raise a

* `UnhashableKeyException`: Unhashable key encountered during map unpacking. The packed map cannot be unpacked into a Python dictionary.

Python dictionaries only support keys that are instances of `collections.Hashable`, so while the map `{ { u'abc': True } : 5 }` has a MessagePack encoding, it cannot be unpacked into a valid Python dictionary.
Python dictionaries only support keys that are instances of `collections.Hashable`, so while the map `{ { u'abc': True } : 5 }` has a MessagePack serialization, it cannot be unpacked into a valid Python dictionary.

``` python
# Attempt to unpack { {} : False }
Expand All @@ -351,7 +351,7 @@ If a non-byte-string argument is passed to `umsgpack.unpackb()`, it will raise a

* `DuplicateKeyException`: Duplicate key encountered during map unpacking.

Python dictionaries do not support duplicate keys, but MessagePack maps may be encoded with duplicate keys.
Python dictionaries do not support duplicate keys, but MessagePack maps may be serialized with duplicate keys.

``` python
# Attempt to unpack { 1: True, 1: False }
Expand Down
4 changes: 2 additions & 2 deletions msgpack.org.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Streaming serialization with file-like objects:
>>>
```

Encoding and decoding a raw Ext type:
Serializing and deserializing a raw Ext type:
``` python
>>> # Create an Ext object with type 0x05 and data b"\x01\x02\x03"
... foo = umsgpack.Ext(0x05, b"\x01\x02\x03")
Expand All @@ -80,7 +80,7 @@ b'\x01\x02\x03'
>>>
```

Encoding and decoding application-defined types with Ext handlers:
Serializing and deserializing application-defined types with Ext handlers:
``` python
>>> umsgpack.packb([complex(1,2), datetime.datetime.now()],
... ext_handlers = {
Expand Down

0 comments on commit 3b980fe

Please sign in to comment.