русский
Germany.ruForen → Архив Досок→ Programmierung

Python & MySql

08.10.18 10:03
Re: Python & MySql
 
NightWatch коренной житель
NightWatch
in Antwort moose 07.10.18 15:09, Zuletzt geändert 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)


 

Sprung zu