Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
251126 || DispatchJapan 𝕏 UPDATE
Every member slayed in their own way. who caught your eye first? 👀🔥
#IDLE#아이들#kpop#dispatch
Get a Free K-pop Postcard :👉https:// http://www.dipebeta.app/
–🦋
── @GIDLE_UPDATE ──
🇬🇧Dispatch #1-2
🇷🇺Диспетчер #1-2
Серия из четырех цифровых комиксов, выпущенных AdHoc Studio в составе Deluxe Edition игры Dispatch
🗣еще 2 выпуска заливать или не нравится такое❓
#комикс#comics#диспетчер#dispatch
#adhoc_studio
https://www.python.org/dev/peps/pep-0443/
This PEP proposes a new mechanism in the #functools standard library module that provides a simple form of generic programming known as #single_dispatch#generic functions.
A generic function is composed of multiple functions implementing the same operation for different types. Which implementation should be used during a call is determined by the #dispatch algorithm. When the implementation is chosen based on the type of a single argument, this is known as #single_dispatch .
#overloading