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 слични објави

Пребарај: #zoomers

当前筛选 #zoomers清除筛选
NIDO Russia (НИДО)

@nido_russia · Post #1663 · 24.06.2024 г., 22:52

Zoomers Embrace NEET Trend in Southern Europe — Not in Education, Employment, or Training A new trend among Zoomers (Generation Z) is gaining traction: NEET, which stands for "Not in Education, Employment, or Training." This trend reflects a significant number of young people opting out of traditional career paths. In Southern Europe, one in five Zoomers is reportedly following this trend. Experts attribute this shift to growing pessimism about career prospects and earnings. Many young people have concluded that there is no point in striving for traditional employment or education paths, given the perceived lack of opportunities and financial stability. Subscribe: @nido_russia #genz#zoomers#europe#nidorussia