示例#1
0
文件: gtstr.py 项目: pythseq/EDTA
 def __init__(self, s=None):
     if s == None:
         self.strg = gtlib.gt_str_new()
         self.own = True
     elif isinstance(s, str):
         self.strg = gtlib.gt_str_new_cstr(str(s).encode('UTF-8'))
         self.own = True
     elif isinstance(s, bytes):
         self.strg = gtlib.gt_str_new_cstr(s)
         self.own = True
     else:
         self.strg = s
         self.own = False
     self._as_parameter_ = self.strg
示例#2
0
 def __init__(self, s=None):
     if s == None:
         self.strg = gtlib.gt_str_new()
         self.own = True
     elif isinstance(s, str):
         self.strg = gtlib.gt_str_new_cstr(str(s).encode('UTF-8'))
         self.own = True
     elif isinstance(s, bytes):
         self.strg = gtlib.gt_str_new_cstr(s)
         self.own = True
     else:
         self.strg = s
         self.own = False
     self._as_parameter_ = self.strg
示例#3
0
 def __init__(self, s=None):
     if s == None or isinstance(s, str):
         self.strg = gtlib.gt_str_new_cstr(s)
         self.own = True
     else:
         self.strg = s
         self.own = False
     self._as_parameter_ = self.strg
示例#4
0
 def __init__(self, s=None):
     if s == None or isinstance(s, str):
         self.strg = gtlib.gt_str_new_cstr(s)
         self.own = True
     else:
         self.strg = s
         self.own = False
     self._as_parameter_ = self.strg