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

Резултати

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

Пребарај: #adpm

当前筛选 #adpm清除筛选
Addis Standard

@addisstandardeng · Post #21510 · 24.02.2026 г., 09:10

News: #NAMA, #ADPM welcome House of Federation decision to hold elections in five districts outside #Tigray oversight The National Movement of #Amhara (NAMA) and the Amhara Democratic Force Movement (ADPM) have welcomed a recent decision by the House of #Federation to conduct elections in five districts outside the oversight of the Tigray regional authorities, pending the resolution of their constitutional status. In separate statements issued following emergency executive meetings, both organisations said the decision provides a legal response to long-standing questions of political participation and identity in the “contested” electoral districts, while also raising concerns about its implementation. NAMA said it respects the decision, which followed communication between the House of Federation and #NEBE, & described it as consistent with the spirit of the Pretoria Agreement. For its part, ADPM described the House’s move as “the beginning of historical.... Read more: https://addisstandard.com/?p=55369