Skip to content

Commit

Permalink
minor clean up to comments and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
vsergeev committed Sep 29, 2014
1 parent 282d8ec commit 76737aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions test_umsgpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# $ python2 test_umsgpack.py
# $ python3 test_umsgpack.py
# $ pypy test_umsgpack.py
# $ pypy3 test_umsgpack.py
#

import umsgpack
Expand Down
22 changes: 11 additions & 11 deletions umsgpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class DuplicateKeyException(UnpackException):
### Exported Functions and Globals
################################################################################

# Exported functions and variables set in __init()
# Exported functions and variables, set up in __init()
pack = None
packb = None
unpack = None
Expand Down Expand Up @@ -206,7 +206,7 @@ class DuplicateKeyException(UnpackException):

# You may notice struct.pack("B", obj) instead of the simpler chr(obj) in the
# code below. This is to allow for seamless Python 2 and 3 compatibility, as
# chr(obj) has a str return type instead of bytes in Python 3, and
# chr(obj) has a str return type instead of bytes in Python 3, and
# struct.pack(...) has the right return type in both versions.

def _pack_integer(obj, fp):
Expand Down Expand Up @@ -436,7 +436,7 @@ def _packb2(obj):
obj: a Python object
Returns:
A 'str' containing the serialized bytes.
A 'str' containing serialized MessagePack bytes.
Raises:
UnsupportedType(PackException):
Expand All @@ -459,7 +459,7 @@ def _packb3(obj):
obj: a Python object
Returns:
A 'bytes' containing the serialized bytes.
A 'bytes' containing serialized MessagePack bytes.
Raises:
UnsupportedType(PackException):
Expand Down Expand Up @@ -650,7 +650,7 @@ def _unpack2(fp):
fp: a .read()-supporting file-like object
Returns:
A deserialized Python object.
A Python object.
Raises:
InsufficientDataException(UnpackException):
Expand Down Expand Up @@ -681,7 +681,7 @@ def _unpack3(fp):
fp: a .read()-supporting file-like object
Returns:
A deserialized Python object.
A Python object.
Raises:
InsufficientDataException(UnpackException):
Expand All @@ -699,7 +699,7 @@ def _unpack3(fp):
Example:
>>> f = open("test.bin")
>>> umsgpack.unpackb(f)
{u'compact': True, u'schema': 0}
{'compact': True, 'schema': 0}
>>>
"""
return _unpack(fp)
Expand All @@ -710,10 +710,10 @@ def _unpackb2(s):
Deserialize MessagePack bytes into a Python object.
Args:
s: a 'str' containing the MessagePack serialized bytes.
s: a 'str' containing serialized MessagePack bytes
Returns:
A deserialized Python object.
A Python object.
Raises:
TypeError:
Expand Down Expand Up @@ -745,10 +745,10 @@ def _unpackb3(s):
Deserialize MessagePack bytes into a Python object.
Args:
s: a 'bytes' containing the MessagePack serialized bytes.
s: a 'bytes' containing serialized MessagePack bytes
Returns:
A deserialized Python object.
A Python object.
Raises:
TypeError:
Expand Down

0 comments on commit 76737aa

Please sign in to comment.