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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #61 · 2 апр.

Ранее я уже упоминал о другой фишке из ˍˍfutureˍˍ , это оператор деления. from __future__ import division Суть проста. Раньше сложность типа данных результата поределялась типом самого сложного операнда. Например: int/int => int int/float => float В первом случае оба операнда int, значит и результат будет int. Во втором float более сложный тип, поэтому результат будет float. Если нам требуется получить дробное значение при делении двух int то приходилось форсированно один из операндов конверировать в float. 12/float(5) => float Но с новой "философией" это не требуется. В Python3 "floor division" заменили на "true division" а старый способ теперь работает через оператор "//". >>> 3/2 1.5 >>> 3//2 1 То есть теперь деление int на int даёт float если результат не целое число. В классах теперь доступны методы __floordiv__() и __truediv__() для определения поведения с этими операторами. Данный переход описан в PEP238. #pep#2to3#basic

Резултати

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

Пребарај: #savegaza

当前筛选 #savegaza清除筛选
BadVolf

@badvolfnews · Post #1147 · 20.10.2023 г., 06:25

🚨 Urgent Update: Gaza Humanitarian Crisis 🚨 WHO warns of a "death sentence" for vulnerable hospital patients in Gaza due to Israel's evacuation order. Moving them within 24 hours is impossible and inhumane. UN calls it "impossible" and EU diplomat calls it "utterly unrealistic". Hospitals are at breaking point, with limited electricity and critical shortages. Time is running out to prevent a catastrophe. Urgent delivery of supplies and a humanitarian corridor needed. #SaveGaza#HumanitarianCrisis https://www.aljazeera.com/news/2023/10/13/israels-evacuation-order-for-gaza-death-sentence-for-patients-who-says Subscribe to @BadVolfNews

BadVolf

@badvolfnews · Post #1261 · 12.11.2023 г., 12:25

🚨GENOCIDE ALERT🚨 Gaza is being subjected to a horrifying campaign of violence. Over 11,000 dead, including 1,400 children. Hospitals and schools targeted. Palestinians denied access to basic necessities. This is genocide. We must recognize the humanity of the Palestinian people and demand an end to this atrocity. #SaveGaza#EndGenocide https://www.aljazeera.com/opinions/2023/11/12/genocide-in-gaza-a-call-for-urgent-global-action Subscribe to @BadVolfNews

BadVolf

@badvolfnews · Post #1199 · 01.11.2023 г., 14:25

🔻 Gaza Strip: A graveyard for children. UN warns of more deaths due to dehydration amid Israel's relentless attacks. Over 8,500 Palestinians, mostly children and women, killed. Shocking figures reveal 420 children killed or injured daily. Ceasefire and humanitarian aid urgently needed. Water crisis and trauma pose additional threats. Mental health support desperately required for over 800,000 children. Collateral damage? No safe place in Gaza. International attention needed! #SaveGaza#ChildrenUnderAttack https://www.aljazeera.com/news/2023/10/31/gaza-has-become-a-graveyard-for-thousands-of-children-un Subscribe to @BadVolfNews