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

Пребарај: #underseacables

当前筛选 #underseacables清除筛选
Hong Kong Democracy Movement

@hkdmovement · Post #7916 · 04.12.2024 г., 05:56

立陶宛週五宣布驅逐三名中國大使館人員,限一周內離境,並向北京發送外交照會。自2021年立陶宛允許台灣設立代表處以來,兩國關係已惡化,最近因中國船隻涉嫌破壞波羅的海兩條海底光纜而進一步緊張。 立陶宛外交部表示,驅逐原因為「違反《維也納外交關係公約》及國際法」。立陶宛將與瑞典和芬蘭成立聯合調查小組,調查光纜被切斷事件。中共中國始終尋求干涉他國事務,甚至摧毀其他國家。 #立陶宛#波羅的海#海底電纜#russia#evilCCP#NeverTrustCCP#TakeDownCCP On Friday, Lithuania announced the expulsion of three Chinese embassy staff, ordering them to leave within a week and sending a diplomatic note to Beijing. Tensions have worsened since Lithuania allowed Taiwan to establish a representative office in 2021, and recently over allegations of Chinese ships sabotaging two undersea cables in the Baltic Sea. The Lithuanian Foreign Ministry cited "violations of the Vienna Convention and international law" as the reason for the expulsion. Lithuania will also form a joint investigation team with Sweden and Finland to probe the cable damage. Communist China is always seeking opportunities to interfere in other countries, even destroying them. #Lithuania#BalticSea#UnderseaCables#Russia#EvilCCP#NeverTrustCCP#TakeDownCCP