TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #172 · 26 окт.

Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта. Вполне может заменить самостоятельно придуманную регулярку. >>> 'some_name'.isidentifier() True Обычное имя переменной >>> '私は手紙です'.isidentifier() True Юникод в качестве имени тоже доступен >>> '1_name'.isidentifier() False Имя не может начинаться с цифры >>> '੬_name'.isidentifier() False Включая все цифры юникода >>> 'some name'.isidentifier() False Пробелы недопустимы #basic

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #translated

当前筛选 #translated清除筛选
djangoproject

@djangoproject · Post #433 · 07.09.2017 г., 11:11

https://docs.python.org/3/library/gettext.html The #gettext module provides internationalization (#I18N) and localization (#L10N) services for your #Python modules and applications. It supports both the #GNU gettext message catalog #API and a higher level, class-based API that may be more appropriate for Python files. The interface described below allows you to write your module and application messages in one natural #language, and provide a catalog of #translated messages for running under different natural languages. Some hints on localizing your Python modules and applications are also given.