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

Резултати

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

Пребарај: #symbol

当前筛选 #symbol清除筛选
Language Trivia 🤔

@languagetrivia · Post #404 · 28.11.2024 г., 16:32

The symbol ¶ was commonly used in Medieval manuscripts to indicate a new paragraph. Since there were no standards for indenting or spacing at the time, specialized scribes known as rubricators marked paragraphs (beginning of a different train of thought within the author's narrative) with these ornate symbols, often drawn in red ink. The symbol ¶ has largely fallen out of common use but remains a symbol for paragraph breaks in formatting tools. Take the quiz below to find out what this symbol is called Tap ❤️ @languagetrivia#theory#symbol

djangoproject

@djangoproject · Post #135 · 01.09.2016 г., 18:35

https://wiki.python.org/moin/PythonDecorators This page largely documents the history of the process of adding #decorators to #Python. If you're just interested in what decorators or the '@' #symbol mean in Python, see the Wikipedia page .http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Decorators or PEP 318.

Language Trivia 🤔

@languagetrivia · Post #352 · 19.11.2024 г., 16:39

The @ symbol has many nicknames across different languages. For example: ➖In Russian, it’s known as собака (sobaka), meaning “dog” ➖In German, it’s called Affenschwanz, meaning “monkey’s tail” ➖In Turkish, it’s known as kuyruklu a, meaning “a with a tail” ➖In Finnish, it’s called kissanhäntä, meaning “cat’s tail” What does the Italian name for this symbol mean? A. Monkey B. Snail C. Dog D. Spider Check out the first comment of the quiz below to see the right answer. @languagetrivia#across_languages#symbol

Language Trivia 🤔

@languagetrivia · Post #367 · 22.11.2024 г., 12:17

The ampersand (&) symbol has a rich history intertwined with the evolution of the English alphabet. Originally, it was a ligature of the Latin word “et,” meaning “and.” Over time, this symbol became so integral to writing that it was included as the 27th character in the English alphabet, following ‘Z’. When reciting the alphabet, people would conclude with “X, Y, Z, and per se and,” which translates to “and, by itself, and.” This phrase was eventually slurred together into the single term “ampersand.” Source Tap ❤️ if you found this interesting @languagetrivia#theory#term#symbol#etymology

Language Trivia 🤔

@languagetrivia · Post #463 · 10.12.2024 г., 19:02

In the world of printing and journalism, the exclamation mark (!) has earned a variety of colorful nicknames. One of these humorous terms compares its shape to a specific part of a dog’s anatomy. Sometimes an exclamation mark is humorously referred to as “a dog’s [what]"? A) Tail 🐕 B) Nose 👃 C) Bone 🦴 D) C*ck🍆 Take the quiz below to find out @languagetrivia#punctuation#symbol#slang

GitHub Trends

@githubtrending · Post #14743 · 23.05.2025 г., 14:00

#javascript#ecmascript_proposals#es2015#es2019#es6#es7#esnext#javascript#js#polyfill#ponyfill#promise#proposal#proposals#shim#symbol#weakmap core-js is a modular JavaScript library that provides polyfills for modern ECMAScript features up to 2024, including promises, symbols, collections, iterators, typed arrays, and many web standards like URL and structuredClone. It lets you use new JavaScript features in older browsers by loading only the needed parts without polluting the global namespace. It integrates well with tools like Babel and swc for optimized polyfilling. This helps you write modern, compatible code that runs smoothly across different environments, improving development efficiency and user experience. You can customize polyfill usage and even build your own tailored version for your project. https://github.com/zloirock/core-js