BOOKPYTHON Telegram 3197
Зачем в Python использовать конструкцию if __name__ == '__main__'?

Если коротко: так мы будем уверены, что определённый кусок кода выполнится только в случае, если мы запустим Python-скрипт напрямую. Это позволяет нам без опасений импортировать его в качестве модуля.

👉@BookPython
👍10🔥21🥱1



tgoop.com/BookPython/3197
Create:
Last Update:

Зачем в Python использовать конструкцию if __name__ == '__main__'?

Если коротко: так мы будем уверены, что определённый кусок кода выполнится только в случае, если мы запустим Python-скрипт напрямую. Это позволяет нам без опасений импортировать его в качестве модуля.

👉@BookPython

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




Share with your friend now:
tgoop.com/BookPython/3197

View MORE
Open in Telegram


Telegram News

Date: |

In the next window, choose the type of your channel. If you want your channel to be public, you need to develop a link for it. In the screenshot below, it’s ”/catmarketing.” If your selected link is unavailable, you’ll need to suggest another option. The creator of the channel becomes its administrator by default. If you need help managing your channel, you can add more administrators from your subscriber base. You can provide each admin with limited or full rights to manage the channel. For example, you can allow an administrator to publish and edit content while withholding the right to add new subscribers. Channel login must contain 5-32 characters According to media reports, the privacy watchdog was considering “blacklisting” some online platforms that have repeatedly posted doxxing information, with sources saying most messages were shared on Telegram. On Tuesday, some local media outlets included Sing Tao Daily cited sources as saying the Hong Kong government was considering restricting access to Telegram. Privacy Commissioner for Personal Data Ada Chung told to the Legislative Council on Monday that government officials, police and lawmakers remain the targets of “doxxing” despite a privacy law amendment last year that criminalised the malicious disclosure of personal information.
from us


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