В продолжение прошлого поста про цифры в мире строк.
Почему методы isdigit() и isnumeric() не определяют в строке float и отрицательные значения?
Дело в том, что эти методы работают с ЦИФРАМИ, то есть с единичным символом. А строка "-2" или "3.4" это уже ЧИСЛО. То есть не символ а значение, записанное несколькими символами.
Все озвученные методы проходятся по каждому символу строки и проверяют их индивидуально.
В юникоде есть символы цифр с точками "🄀⒈⒉⒊⒋⒌⒍⒎⒏⒐"
Каждая из них это ОДИН СИМВОЛ, поэтому он будет считаться цифрой
>>> '⒌'.isdigit(), '⒌'.isnumeric()
True, True
Но когда мы пишем это выражение в два символа ( 5+точка), то это не работает.
>>> '5.'.isdigit(), '5.'.isnumeric()
False, False
А еще есть такие символы
>>> '⑴⑵⑶⑷⑸'.isdigit()
True
>>> '🄁🄂🄃'.isdigit()
True
Но они не преобразуются в десятичные цифры
>>> '⒈'.isdecimal()
False
>>> '🄃'.isdecimal()
False
>>> '⑶'.isdecimal()
False
#basic
🗓December 3 marks the birthday of Huberte Rupert (1919–2005), a South African philanthropist and art enthusiast whose legacy shaped cultural and social development in the country. 🎨💛🇿🇦
She co-founded the Rupert Museum and supported numerous initiatives in education, healthcare, and the arts.
🖼 The Rupert Museum houses a remarkable collection of modern South African art from the 1940s to the early 2000s. It is located in Stellenbosch, just 50 km east of Cape Town.
Her husband, Anton Rupert, was a prominent South African businessman.
#SouthAfrica#Art#Culture#Philanthropy#HuberteRupert#RupertMuseum#Stellenbosch
🗓3 декабря – день рождения Хуберте Руперт (1919–2005), южноафриканской филантропки и ценительницы искусства, которая внесла огромный вклад в культурные и социальные проекты ЮАР. 🎨💛🇿🇦
Она стала соосновательницей Музея Руперта и поддержала множество инициатив в сфере образования, здравоохранения и искусства.
🖼Музей Руперта хранит впечатляющую коллекцию современного южноафриканского искусства 1940-х — начала 2000-х годов. Он расположен в Стелленбоше, в 50 км к востоку от Кейптауна.
Её муж, Антон Руперт, был известным южноафриканским бизнесменом.
#ЮАР#Искусство#Культура#Филантропия#HuberteRupert#RupertMuseum#Стелленбош#Руперт
🎂 October 4 — Birthday of Anton Edward Rupert (1916 – 2006), South African businessman, philanthropist, and conservationist.
🏛 Museums in South Africa connected to his legacy:
• Rupert Museum (Stellenbosch) — home to one of the most important private collections of 20th-century South African art, assembled by Rupert and his wife Huberte.
• La Motte Museum — located on the family’s wine estate, known for its collection of Pierneef works and Cape Dutch cultural heritage.
• Hester Rupert Art Museum (Graaff-Reinet) — named after Rupert’s mother, showcasing works of South African artists from the mid-20th century.
• Jan Rupert Art Centre (Graaff-Reinet) — a venue for rotating exhibitions under the Rupert Art Foundation.
• Franschhoek Motor Museum 🚗 — a world-class collection of automobiles, motorcycles, and bicycles spanning over 100 years of motoring history, founded by Rupert and later expanded by his son Johann.
🕊 Anton Rupert left a remarkable cultural and environmental legacy, bridging business, art, and nature conservation.
#AntonRupert#SouthAfrica#RupertMuseum#Art#Culture#Heritage#Philanthropy#MotorMuseum