Ранее я уже упоминал о другой фишке из ˍˍ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
@MaxDeleteAll_Bot
Qué puede hacer este bot?
Este bot te ayuda a eliminar gran cantidad de mensajes en tus grupos o canales
use use /delall si desea que se eliminen todos los mensajes
use use /delfrom (punto inicial) & /delto (punto final) antes de usar /delsel si desea eliminar esos & todos los mensajes posteriores.
Idioma: Inglés
(visto en @BotsGram_cu)
#delete
Fast FB Delete Tool
by marcelja
Fast Facebook Activity Deletion
This program can be used to clean up a facebook account without deleting the entire account.
https://github.com/marcelja/facebook-delete
#fb#facebok#delete
Redact
Allows you to automatically clean up your old posts from services like Twitter, Reddit, Facebook, Discord and more all in one place
https://redact.dev
#redact#delete#fb#twitter#reddit
@MassActionBot
Qué puede hacer este bot?
Este bot puede realizar múltiples acciones en tu Chat. ¿Cuál? Ahí lo tienes.:
- Eliminar todos los mensajes
- Kick all
- Ban all
- Silencio todo
- Unban all
- Activar todo
Idioma: Inglés
(visto en @BotsGram_cu)
#chanel, #groups, #delete, #ban, #kick, #mute
@daysandbox_bot
Qué puede hacer este bot?
Este bot elimina las publicaciones reenviadas y que contienen enlaces de los nuevos usuarios del grupo
(visto en @BotsGram_cu)
#gestión, #grupo, #chat, #unión, #bienvenido, #mute, #delete
@shiiinabot
Qué puede hacer este bot?
Un bot para eliminar automáticamente los mensajes no deseados predefinidos del grupo.
Idioma: Portugués
(visto en @BotsGram_cu)
#delete, #group, #notification, #message, #regex, #spam, #picture, #remove
@GitHubBot
Qué puede hacer este bot?
Este es un bot de GitHub. Puede notificarle sobre eventos en sus repositorios públicos de GitHub. También puede responder a tus mensajes para publicar comentarios en GitHub directamente desde Telegram.
Idioma: Inglés
(visto en @BotsGram_cu)
#telegram, #notify, #events, #github, #delete, #public, #command, #messages, #repository
@DeleteEventsBot
Qué puede hacer este bot?
Este bot elimina mensajes de eventos (también conocidos como mensajes de acción) en supergrupos.
Idioma: Inglés
(visto en @BotsGram_cu)
#delete, #service, #message, #spam, #helper, #group, #supergroup, #join, #left, #pinned