Just when you thought it was safe to unicode....
>>> unicode(3)
u'3'
>>> unicode(3, errors='replace')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: coercing to Unicode: need string or buffer, int found
If you prefer Python3:
>>> str(3)
'3'
>>> str(3, errors='replace')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: coercing to str: need bytes, bytearray or buffer-like object, int found
Yes, str is really two functions in one. print(str.__doc__) will tell you how it's used.
ReplyDeleteBook Ve Du Lich Gia Re
ReplyDeleteNhung Chuyen Di Cuoc Doi
Ngẫu Hứng Du Lịch
Tri Thuc Du Lich
Different mill saddlery staff endpoints, codes and approaches looking thrilling of view, travel, stray pieces, ... Unequivocal endpoints, cashback and vouchers for NHS and Healthcare Workers.
ReplyDelete