Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
LinkWarden
Self-hosted, open-source #bookmark + archive manager to collect, and save websites for offline use.
The objective is to have a self-hosted place to keep useful links in one place, and since useful links can go away (see the inevitability of Link Rot), LinkWarden also saves a copy of the link as screenshot and PDF.
https://github.com/Daniel31x13/link-warden
📖 Inside the First Art Gallery for Blind Artists and Audiences #bookmark#raindrop
https://www.thrillist.com/travel/nation/envision-arts-gallery-wichita-kansas