Вычисление выражений Python
Вы наверняка знакомы с eval, но знаете ли вы о literal_eval? Вряд ли. Для безопасного исполнения выражений, содержащих исключительно литералы, вы можете делать так, как показано на картинке выше.
Между прочим, данная фича находится в языке уже очень давно.
#tips#eval
📰The problem with "paid channels".
When I first subscribed to a paid channel in 2024, paying for stars to access the channel, I also joined a linked group to read the comments on the posts. After a month, like the average Telegram user, I ran out of 50 stars for monthly access to the channel. However, I stayed in the group that served to access the comments in paid posts. Here I realized that since these chats are linked, I could freely access the channel without paying for stars, and that I could then re-join the same channel.
Now #tips for content creators: Anyone who wants to engage in paid channels should definitely not enable comments, or more precisely, not link discussion groups. Otherwise, subscribers won't pay for access to the channel a second time. Also, don't forget to enable protection against copying/reposts/screenshots (there's no 100% protection). This way, you'll make the channel on par with Patreon pages.
I also created this card so that developers can see this problem.
https://t.me/bugs?startapp=c-50317