В продолжение прошлого поста про цифры в мире строк.
Почему методы 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
DRDO Chief Dr. Samir V Kamat has inaugurated a Compo-Rheo Die Casting (CRDC) facility at IISc-Bengaluru Campus for producing high-performance alloys.
CRDC is an advanced hybrid metallurgical process that combines elements of Composite material fabrication & Rheocasting to produce high-performance metal matrix composites.
#aatmarnirbharbharat
Mishra Dhatu Nigam Limited (MIDHANI) has inaugurated a state-of-the-art Aerospace Fasteners Facility in Hyderabad, marking its transition into a fully integrated manufacturer of high-precision components for extreme environments, including titanium and superalloy fasteners. By maintaining 100% in-house production and hosting resident inspection agencies, the facility ensures stringent quality control and compliance for the defense and aerospace sectors.
Source
#aatmarnirbharbharat#defence
DRDO Chairman Dr Samir V Kamat said the Ghatak UCAV will be comparable to a stealth fighter in capability. "They will be like fighters, they would be a stealth fighter... about a 13-ton class... LCA type fighter aircraft," Kamat said, adding that a recent proposal cleared by the Defence Procurement Board envisages induction of around 67 such systems. #Defence#aatmarnirbharbharat
BDL achieved a major milestone in indigenous defence manufacturing with the delivery of India’s first Production-Grade Wire Guided Heavy Weight Torpedo to NSTL at Visakhapatnam. #Defence#aatmarnirbharbharat
Vadodara-based INOX India has flagged-off the 'simulated Liquid Oxygen (LOX) Storage Module' to DRDO (NMRL) for India’s first indigenous AIP System. #Defence#aatmarnirbharbharat
Hyderabad-based ZenT echnologies has received a licence to manufacture 12.7mm, 23mm, 30mm & 40mm air defence guns to defend from low flying targets. #Defence#aatmarnirbharbharat
HAL has inaugurated a LCH Prachand (156 on order) Structure Assembly Line and an Automated Storage & Retrieval System (ASRS) at Tumakuru (Karnataka) today. #Defence#aatmarnirbharbharat
Union Cabinet approves Bharat Maritime Insurance pool (BMI pool) with a sovereign guarantee of Rs 12,980 crore to facilitate continuous maritime insurance coverages: I&B Minister Ashvini Vaishnav
This will reduce dependence on foreign insurance providers for maritime transport #Policy#aatmarnirbharbharat
Atomberg Tech introduces 1st Generation Drone Propulsion Systems.
An excellent step towards becoming 'Atmanirbhar' in #drones. Presently most of these propulsion systems are imported. #aatmarnirbharbharat
Delhi-based dpropulse is building India's first rotating detonation engine (RDE).
#Aviation#aatmarnirbharbharat
https://fxtwitter.com/i/status/2044030717123014797