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

Резултати

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

Пребарај: #architecturenews

当前筛选 #architecturenews清除筛选

Secret Gardens. Winning Housing Project by Vincent Callebaut Architectures in Montpellier, France Vincent Callebaut Architectures is the winner – in a consortium with Bouygues Immobilier Languedoc-Roussillon & Vestia Promotions – of the SERM/SA3M group's call for projects for a 4,013 m² property in the City of Montpellier within the ZAC EAI, the beating heart of the new Creative City, crossroads of Cultural and Creative Industries. The programme for "Secret Gardens" includes 113 apartements – 30% of which are in the form of affordable housing – divided between three buildings, promoting a residential experience in an environment where social cohesion, well-being and living together are paramount. Architecture: Vincent Callebaut Architectures Location: Montpellier, France #arch_shovel#architecture#winner#award#architecturenews#news

Ombelle complex. New York-based architecture studio ODA has revealed the design of Ombelle, a duo of residential towers. Architect: ODA Location: Fort Lauderdale, Florida. #arch_shovel#architecture#newyork#news#ArchitectureNews#towers

City of Leaves / Tech city of Healing. 80m tower as a floating roof with green garden underneath. Sou Fujimoto won the competition to design a tower and cultural facilities in Nanchang, China. Architecture: Sou Fujimoto Client: China Jinmao 中国金茂 Location: Nanchang, China Program: Culture Center, Observatory Tower and Restaurant. #arch_shovel#architecture#SouFujimoto#architects#award#news#ArchitectureNews