Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🎬 Nine films. Nine stories celebrating the charm and character of Singapore’s conserved buildings.
✨ Discover how these spaces, beautifully restored, continue to serve our needs today.
📺 Watch the films and cast your vote for the People’s Choice Award by liking your favourite in the NTU-AHA Films playlist. Voting ends on 12 Dec 2025, 6pm: https://go.gov.sg/ahashortfilms
#SingaporeArchitecture#SGHeritage#BuiltHeritage
👀 Look up the next time you walk past a shophouse!
Shophouse signages are more than just names on a building, they add character to our streetscapes.
Swipe through to to see how good signage design practices help to keep the charm of our conservation areas alive! 👉
#URAMemos#ConservationSG#SGHeritage#ShophousesOfSG
Love the vibes at Holland Village? We do too 🙌
From low-rise buildings to continuous walkways and elegant signages, find out how we’re retaining the unique charm and familiar identity of the area through thoughtful planning and design.
#HollandVillage#ExploreSingapore#UrbanDesign#IdentityNode#SGHeritage