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

Резултати

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

Пребарај: #beirutunderattack

当前筛选 #beirutunderattack清除筛选
Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3656 · 17.11.2024 г., 18:14

Israel has struck Beirut once again, this time targeting Mar Elias Street; the heart of the capital and one of its most densely populated areas during the war, as countless displaced families from the suburbs have sought refuge there. This relentless aggression is not just an attack on civilians; it’s a blatant violation of all norms of international law, crossing every red line. #LebanonUnderAttack #BeirutUnderAttack

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3646 · 14.11.2024 г., 10:31

#Israel is bombarding residential areas just meters from #Beirut International Airport, where civilian flights are landing in real time. The strikes put thousands of innocent lives at immediate risk, blatantly violating international law by targeting civilian infrastructure and densely populated areas. Yet where is the international outrage? Why does the world remain silent while Israel commits these acts with complete impunity? This isn’t just a tragedy for Lebanon—it’s a catastrophic precedent for global justice, human rights, and the rule of law. #BeirutUnderAttack#InternationalLaw#StandWithLebanon