Deutsch
Germany.ruФорумы → Архив Досок→ Программирование

Python & MySql

08.10.18 10:03
Re: Python & MySql
 
NightWatch коренной житель
NightWatch
в ответ moose 07.10.18 15:09, Последний раз изменено 08.10.18 10:09 (NightWatch)
почему print всегда использует acsii-encoding?

Не всегда. acsii - это только кодировка по умолчанию. https://docs.python.org/2/library/locale.html?highlight=lc...

object.__str__(self) Called by the str() built-in function and by the print statement to compute the “informal” string representation of an object. The return value must be a string object.

В python есть типы данных string и unicode. Для unicode используется object.__unicode__(self)


 

Перейти на