Ранее я уже упоминал о другой фишке из ˍˍ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
📰Group Appearance Settings
Upgrading your group will unlock new features for the group:
- Color and Profile Logo
- Group Status Emoji
- Group Theme and Wallpaper
- Group Emoji Pack
#Boost | #Groups
👉The TG Times
📰Group Custom Emoji Pack
Group Admins can set a Custom Emoji Pack for the group.
All members can use emojis from this pack in the group, even without ⭐️ Premium subscription.
#Boost | #Groups
👉The TG Times
📰Boost to send messages in the group
Group admins can choose how many boosts a user must give to the group to bypass restrictions on sending messages.
#Boost | #Groups
👉The TG Times
📰Boosting Groups
Changes in the configuration of Telegram for macOS show that it will be possible to boost groups.
After upgrading groups, the ability to set the background for the group, choose the status emoji and choose the emoji pack for the group will be added.
It seems that just as in groups, the special sticker pack for that group can be set, it will also be possible to choose the emoji pack.
Thanks to @tgcrawl
#Boost | #Groups
👉The TG Times
📰Boosting Groups
Changes in the configuration of Telegram for macOS show that it will be possible to boost groups.
After upgrading grouos, the ability to set the background for the group, choose the status emoji and choose the emoji pack for the group will be added.
It seems that just as in groups, the special sticker pack for that group can be set, it will also be possible to choose the emoji pack.
Thanks to @tgcrawl
#Boost | #Groups
👉The TG Times
📰Boosting Groups
Changes in the configuration of Telegram for macOS show that it will be possible to boost groups.
After upgrading grouos, the ability to set the background for the group, choose the status emoji and choose the emoji pack for the group will be added.
It seems that just as in groups, the special sticker pack for that group can be set, it will also be possible to choose the emoji pack.
Thanks to @tgcrawl
#Boost | #Groups
👉The TG Times
@TheNexasMusic_bot
Qué puede hacer este bot?
Con este bot puedes reproducir música nn grupos de telegram a través del chat de voz!
Idioma: Inglés
(visto en @BotsGram_cu)
#groups, #music
@Gramaphone_voice_bot
Qué puede hacer este bot?
Con este bot puedes reproducir música nn grupos de telegram a través del chat de voz!
Idioma: Inglés
(visto en @BotsGram_cu)
#groups, #music
@MultiForwardBot
Qué puede hacer este bot?
Este bot reenvía mensajes y medios de tu canal a grupos ilimitados de telegram!
Idioma: Inglés, Italiano, Español
(visto en @BotsGram_cu)
#channel, #groups