Permalink
Browse files

Replaced the encode and decode functions to use a global encoder and …

…decoder object, to avoid to recreate it at each call.
  • Loading branch information...
1 parent 1841532 commit c83c03d414fc5736e5a33d398533acc223ef8eff Jonathan Stoppani committed Aug 12, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −4 erlastic/__init__.py
View
@@ -7,8 +7,6 @@
from erlastic.codec import ErlangTermDecoder, ErlangTermEncoder
from erlastic.types import *
-def encode(obj):
- return ErlangTermEncoder().encode(obj)
+encode = ErlangTermEncoder().encode
+decode = ErlangTermDecoder().decode
-def decode(obj):
- return ErlangTermDecoder().decode(obj)

0 comments on commit c83c03d

Please sign in to comment.