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

Резултати

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

Пребарај: #november

当前筛选 #november清除筛选
悦读「优质少量RSS聚合」

@Dailyrss · Post #13181 · 27.11.2025 г., 00:45

Wikipedia每日一图(#November 27, 2025)https://ift.tt/Wg6MXxG A shattered ceiling light fixture on a bamboo floor mat. The lamp was a semi flush mounted light fixture with a shallow glass dome of clear glass coated with white glass on the inside. In the fixture are LED light bulbs with E27 Edison screw. The hook in the ceiling suddenly came lose one day and the lamp crashed to the floor in an apartment in Brastad, Lysekil Municipality, Sweden. Photographed in natural light from the window. Focus stacked from 10 photos.. 了解更多 . #Wikipedia每日一图

悦读「优质少量RSS聚合」

@Dailyrss · Post #13177 · 23.11.2025 г., 00:45

Wikipedia每日一图(#November 23, 2025)https://ift.tt/9zNt12M A full-size test article of the SpaceX Crew Dragon named DragonFly fires its eight SuperDraco engines in a development test of its ability to land with the accuracy of a helicopter using only the thrusters. The company conducted two tethered tests vehicle attached to a crane so engineers could refine the landing software and systems on the spacecraft. SpaceX envisions returning people to Earth from space on the power of thrust instead of beneath parachutes. SpaceX, in partnership with NASA’s Commercial Crew Program, is developing the Crew Dragon and Falcon 9 integrated system to take astronauts to launch astronauts to the International Space Station from the United States.. 了解更多 . #Wikipedia每日一图

123•••56
ПретходнаСтраница 1 од 6Следна