##// END OF EJS Templates
CBytes and CStr only try casting to bytes (=str), not to unicode.
Thomas Kluyver -
Show More
@@ -971,10 +971,7 b' class CBytes(Bytes):'
971 try:
971 try:
972 return bytes(value)
972 return bytes(value)
973 except:
973 except:
974 try:
974 self.error(obj, value)
975 return unicode(value)
976 except:
977 self.error(obj, value)
978
975
979
976
980 class Unicode(TraitType):
977 class Unicode(TraitType):
General Comments 0
You need to be logged in to leave comments. Login now