Telegram Group & Telegram Channel
Есть три ситуации, в которых только что созданную переменную нельзя аннотировать типом: распаковка кортежей, циклы for и инструкции with.

Все эти примеры некорректны:


name: str, age: int = student

for x: int in numbers:
...

with connection() as conn: Connection:
...


Правильный способ указать тип таких переменных — объявить их заранее, без инициализации:


conn: Connection
with connection() as conn:
...


👉@BookPython



tg-me.com/BookPython/3662
Create:
Last Update:

Есть три ситуации, в которых только что созданную переменную нельзя аннотировать типом: распаковка кортежей, циклы for и инструкции with.

Все эти примеры некорректны:


name: str, age: int = student

for x: int in numbers:
...

with connection() as conn: Connection:
...


Правильный способ указать тип таких переменных — объявить их заранее, без инициализации:


conn: Connection
with connection() as conn:
...


👉@BookPython

BY Библиотека Python разработчика | Книги по питону


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/BookPython/3662

View MORE
Open in Telegram


Библиотека Python разработчика Telegram | DID YOU KNOW?

Date: |

Telegram Gives Up On Crypto Blockchain Project

Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.Библиотека Python разработчика from us


Telegram Библиотека Python разработчика | Книги по питону
FROM USA