Skip to content

Commit

Permalink
closes #66
Browse files Browse the repository at this point in the history
  • Loading branch information
tomerfiliba committed Feb 28, 2012
1 parent 91e0c69 commit 1824a33
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions rpyc/core/brine.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
True
>>> y = dump(x)
>>> y.encode("hex")
'140e0b686557080c6c6c6f580216033930300003061840323333333333331b402a0000000000\\
00403233333333333319125152531a1255565705'
'140e0b686557080c6c6c6f580216033930300003061840323333333333331b402a000000000000403233333333333319125152531a1255565705'
>>> z = load(y)
>>> x == z
True
Expand Down Expand Up @@ -223,9 +222,15 @@ def _load_false(stream):
@register(_load_registry, TAG_EMPTY_TUPLE)
def _load_empty_tuple(stream):
return ()
@register(_load_registry, TAG_EMPTY_STR)
def _load_empty_str(stream):
return ""

if is_py3k:
@register(_load_registry, TAG_EMPTY_STR)
def _load_empty_str(stream):
return BYTES_LITERAL("")
else:
@register(_load_registry, TAG_EMPTY_STR)
def _load_empty_str(stream):
return ""

if is_py3k:
@register(_load_registry, TAG_LONG)
Expand Down Expand Up @@ -357,7 +362,7 @@ def load(data):
def dumpable(obj):
"""Indicates whether the given object is *dumpable* by brine
:returns: ``True`` if the object is dumpable (e.g., dumps would succeed),
:returns: ``True`` if the object is dumpable (e.g., :func:`dump` would succeed),
``False`` otherwise
"""
if type(obj) in simple_types:
Expand Down

0 comments on commit 1824a33

Please sign in to comment.