Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
@tlgrmcbot
Qué puede hacer este bot?
Este es el bot oficial de telegramic.org! La gente a menudo me usa para iniciar sesión en el sitio web de Telegramic. Pero puedo hacer más! Si no puede encontrar un contenido de Telegram en Telegramic, ¡puede agregarlo!
Idioma: Inglés
(visto en @BotsGram_cu)
#channels, #search, #index, #bestof, #rating, #reviews, #share, #inline, #explore, #discover, #add, #telegramic, #telegram
@bookmarchbot
Qué puede hacer este bot?
BookmarchBot guarda sus enlaces favoritos para que pueda encontrar fácilmente y enviarlos / compartirlos más tarde.
Idioma: Inglés
(visto en @BotsGram_cu)
#bookmark, #link, #url, #website, #favorite, #favorite, #favorite, #share, #bookmarks, #links, #inline, #www, #http, #https, #web, #bestof, #bestof, #sites, #keep