TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #418 · 9 мар.

Оператор pipe позволяет писать более компактный код, реализуя логику объединения данных (Union). Важно помнить, что его поведение зависит от контекста. Побитовые операции (логическое OR) result = 5 | 3 # 5 (0101) | 3 (0011) = 7 (0111) Самое главное - не путать с оператором or, это другое! Объединение множеств set_a = {1, 2, 3} set_b = {3, 4, 5} set_c = set_a | set_b # {1, 2, 3, 4, 5} set_c |= {5, 6} # {1, 2, 3, 4, 5, 6} Слияние словарей dict_1 = {"a": 1, "b": 2} dict_2 = {"b": 3, "c": 4} merged = dict_1 | dict_2 # {'a': 1, 'b': 3, 'c': 4} merged |= {"d": 5} # {'a': 1, 'b': 3, 'c': 4, 'd': 5} Аннотации типов, заменяет Union def process_data(value: int | str) -> None: print(value) Допустимо использовать в isinstance или issubclass isinstance(3, int | float) # True Паттерн-матчинг status_code = 404 match status_code: case 200 | 201 | 204: print("OK") case 400 | 404 | 500: print("ERROR") Для использования в своих классах требуется переопределить метод __or__ Так же нашел библиотеку pipe которая добавляет еще много возможностей. Рекомендую ознакомиться ;) #basic

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #ancestry

当前筛选 #ancestry清除筛选
DNAmeter

@DNAMeter · Post #1922 · 20.05.2025 г., 09:50

Possible Y-DNA paternal lineage of Genghis Khan 🇲🇳 Scholars suggest haplogroups C3*, Q, R1b, and C2 for his paternal line. Dayan Khan’s descendants show C2c1a1a1-M407, a distinct Mongol C2 subclade, while common C2b1a3a1c2-F5481 in Kazakhs and Hazaras comes from ordinary soldiers. Jochi’s line links to C2b1a1b1-F1756; Derenko suggests C-F4002; a 2016 study points to R-M343 (R1b). Conflicting data leave his true Y-DNA unknown. تبار پدری Y-DNA احتمالی چنگیز خان 🇲🇳 دانشمندان برای خط پدری او هاپلوگروپ‌های C3*، Q، R1b و C2 را پیشنهاد کرده‌اند. نوادگان دایان خان زیرشاخه C2c1a1a1-M407 را نشان می‌دهند—یک شاخه منحصربه‌فرد از C2 مغولی—در حالی که C2b1a3a1c2-F5481 رایج در قزاق‌ها و هزاره‌ها ناشی از سربازان عادی است. نسل جُچی به C2b1a1b1-F1756 مرتبط است؛ درنکو C-F4002 را مطرح می‌کند؛ و مطالعه‌ای در ۲۰۱۶ به R-M343 (R1b) اشاره دارد. این تناقض‌ها تبار Y واقعی چنگیز خان را همچنان نامشخص نگه می‌دارد. #ancestry Oymaqat | اویماقات

Hashtags

Interesting Planet 🌍

@interesting_planet_facts · Post #480 · 01.08.2025 г., 16:22

🌎 The pikaia, a tiny worm-like creature from 500 million years ago, may be one of our earliest known ancestors. Its flexible, cord-like structure helped pave the way for the backbone found in all vertebrates today. ✨ #evolution⚡#paleontology⚡#ancestry 👉subscribe Interesting Planet

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40667 · 18.02.2026 г., 07:04

The “Identical Ancestors Point” is estimated to be about 5,000–15,000 years ago. For Europeans, it may be around 1000 A.D. Some religions teach that all humans share common ancestors from a few thousand years ago, which is similar to these estimates. Simplified: Before this point, all living people share the same ancestors, but inherit different amounts of DNA. 🧬🌍 [Read more] #humanhistory#genetics#sciencefacts#ancestry#history@googlefactss