summaryrefslogtreecommitdiff
path: root/python/src/_cdec.pyx
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-08-11 23:30:00 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-08-11 23:30:00 -0400
commit7527592aaf4245749845500aca6a7fcc97eb2f17 (patch)
treed8fdb627c657e7a4699baf0670ca749df1f7e972 /python/src/_cdec.pyx
parentdad8da6f5f65e157476b3999257069bda7b8552e (diff)
[python] fix for new dict API
- TDConvert returns a string - various c_str fixes (make copies) - cleanup .gitignore
Diffstat (limited to 'python/src/_cdec.pyx')
-rw-r--r--python/src/_cdec.pyx4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/src/_cdec.pyx b/python/src/_cdec.pyx
index af4e5f2f..5cdf8eb3 100644
--- a/python/src/_cdec.pyx
+++ b/python/src/_cdec.pyx
@@ -37,7 +37,7 @@ def _make_config(config):
for name in value:
yield key, name
else:
- yield key, bytes(value)
+ yield key, str(value)
cdef class Decoder:
cdef decoder.Decoder* dec
@@ -85,7 +85,7 @@ cdef class Decoder:
property formalism:
def __get__(self):
cdef variables_map* conf = &self.dec.GetConf()
- return conf[0]['formalism'].as_str().c_str()
+ return str(conf[0]['formalism'].as_str().c_str())
def read_weights(self, weights):
with open(weights) as fp: