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

Пребарај: #transman

当前筛选 #transman清除筛选
Social Justice Watch

@social_justice_watch · Post #17272 · 25.09.2022 г., 01:11

There are infinite ways to be trans. Try not to feel discouraged if your experiences are different from other trans people you know. Your journey is uniquely yours. - [IMAGE DESCRIPTION: A tweet by @im_just_laur that says, "If you see 'trans culture' & just can't connect with it, remember that most of not all mainstream trans culture is made by & for a bunch of white trans people early in their transition. It's not inherent to transness. It's not something you have to relate to to be trans." The background photo is a pink sunset on a beach. The remaining text is too long to fit in the caption but can be found in the comments below or by using the alt text feature.] - #trans#transgender#ftm#mtf#nonbinary#gender#genderqueer#queer#lgbt#lgbtq#pride#transgirl#transboy#transwoman#transguy#transman#protecttransyouth#protecttranskids#transjoy https://www.instagram.com/p/Cic3zpPLbMf/