TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #205 · 22 јан.

Как работает функция reload()? Эта функция нужна для того, чтобы перезагрузить изменившийся код из py-файла без рестарта интерпретатора. Дело в том, что любой импортированный модуль при повторном импорте не будет перечитывать файл. Функция импорта вернёт уже загруженный в память объект модуля. Чтобы обновить код, нужно либо перезапустить всю программу, либо использовать функцию reload() from importlib import reload reload(my_module) 🔸 Функция reload() принимает в качестве аргумента только объект модуля или пакета. Она не может перезагрузить класс или функцию. Только весь файл целиком! 🔸 Перезагрузка пакета перезагрузит только его файл __init__.py, если он есть. Но не вложенные модули. 🔸Она не может перезагрузить ранее не импортированный модуль. 🔸При вызове функция reload() перечитывает и перекомпилирует код в файле, создавая новые объекты. После создания новых объектов перезаписывается ранее созданный неймспейс этого модуля. Это значит, что если где-то этот модуль импортирован через import и обращение к атрибутам происходит через неймспейс (имя) модуля, то такие атрибуты обновятся. Если какие-либо объекты из этого модуля импортированы через from то они будут ссылаться на старые объекты. Напишем простой модуль # mymodule.py x = 1 Теперь импортируем модуль и отдельно переменную х из модуля >>> import mymodule >>> from mymodule import x >>> print(mymodule.x) 1 >>> print(x) 1 Не перезапуская интерпретатор вносим изменения в модуль # mymodule.py x = 2 Делаем перезагрузку модуля и проверяем х ещё раз >>> reload(mymodule) >>> print(mymodule.x) 2 >>> print(x) 1 То же самое будет если присвоить любой объект переменной (даже словарь или список) Повторный импорт обновляет значение >>> from mymodule import x >>> print(x) 2 🔸Созданные инстансы классов не обновятся после перезагрузки модуля. Их придётся пересоздать. #tricks#basic

Резултати

Пронајдени 4 слични објави

Пребарај: #oxygenos

当前筛选 #oxygenos清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #731 · 14.04.2026 г., 11:56

Oxygen OS - Port | Android 16 | Nothing Phone (2) ✍️Details: - Based On: OxygenOS 16.0.3 (Base Oneplus 12R) - Version: 1.2.0 - Codename: #Pong - Build date: 14/04/26 🔽 Chnangelog & Download:Here ❌ Known Issues: Here 🔖 Tags: #OxygenOS#Port ⚠️ Notes - SELinux is Permissive. - FW is included, do not flash again! - Root: The shipped kernel is rooted with KSU (KernelSU) by default. - Kernels: Custom kernels are NOT supported. - This build uses a non-secure crypto engine implementation. Any passwords set for privacy features (such as app lock, app hiding, or file vault) can be easily bypassed by simply deleting the associated storage files. Do not rely on it for real security or for protecting sensitive personal data. Special Thanks to @Superuser1958 and @GhostRX89! 👤 Maintainers : @CyberPhantom52 | @El_pong 💬 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #728 · 10.04.2026 г., 14:52

Oxygen OS - Port | Android 16 | Nothing Phone (2) ✍️Details: - Based On: OxygenOS 16.0.3 (Base Oneplus 12R) - Version: 1.1.0 - Codename: #Pong - Build date: 23/03/26 🔽 Cnangelog & Download:Here ❌ Known Issues: Here 🔖 Tags: #OxygenOS#Port ⚠️ Notes - SELinux is Permissive. - Root: The shipped kernel is rooted with KSU (KernelSU) by default. - Kernels: Custom kernels are NOT supported. - Encryption: Storage is NOT encrypted. A Format Data is mandatory if you are currently encrypted. - This build uses a non-secure crypto engine implementation. Any passwords set for privacy features (such as app lock, app hiding, or file vault) can be easily bypassed by simply deleting the associated storage files. Do not rely on it for real security or for protecting sensitive personal data. Special Thanks to @Superuser1958 and @GhostRX89 👤 Maintainers : @CyberPhantom52 | @El_pong 💬 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #723 · 23.03.2026 г., 07:20

Oxygen OS - Port | Android 16 | Nothing Phone (2) ✍️Details: - Version: 16.0.3 RC.1 (Base Oneplus 12R) - Codename: #Pong - Build date: 23/03/26 🔽 Download:Here 💰 Changelogs & Flashing: Here ❌ Known Issues: Here 🔖 Tags: #OxygenOS#Port ⚠️ Notes - SELinux is Permissive. - Root: The shipped kernel is rooted with KSU (KernelSU) by default. - Kernels: Custom kernels are NOT supported. - Encryption: Storage is NOT encrypted. A Format Data is mandatory if you are currently encrypted. - FOD Brightness Limitation: The fingerprint scanner will only register successfully when your screen brightness is manually set to at least 70%. Will be fixed in a future release. - This build uses a NON-secure cryptoeng implementation. Any password protection can be trivially bypassed by deleting the storage files. Use this only to get the features working; do not rely on it for actual security or storing sensitive personal data. 👤 Maintainers : @CyberPhantom52 | @El_pong 💬 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Oneplus 13 Updates

@OnePlus13Series · Post #341 · 13.11.2025 г., 15:50

OnePlus 13 Specifications Codename: dodge cc: TechleaksZone • 6.82" (3168×1440 px) 2K+ BOE X2 LTPO AMOLED display • 1-120Hz variable refresh rate • 4500nits peak brightness • 2160Hz PWM Dimming • Dolby Vision; 1.07 billion colors • Crystal Shield glass protection • Snapdragon 8 Elite SoC • LPDDR5X RAM; UFS 4.0 storage • 9925mm² VC chamber • 50MP main (LYT-T 808, OIS) • 50MP Ultrawide (JN5); 2.5cm macro • 50MP 3X Telephoto (LYT-600; OIS) • 120X Digital Zoom; Hassleblad camera • 32MP Front camera • AAC CSA+ 0916 X-axis linear motor (volume 602mm³) • Goodix Ultrasonic fingerprint • IR Blaster; Alert Slider • Dust & water resistant (IP68 + IP69) • Stereo speakers, OReality & OHaptics • 6000mAh battery; USB-C 3.2 Gen 1 • 100W wired (Max 6.0A at 10V) + 50W wireless charging (Upto 18W PD - IN variant) •4 AndroidOS upgrades + 6yrs Security Patches. (Android 15 OOB) •Lifetime Display Warranty for greenline concerns (For India) @OnePlus13Series | @OnePlus13SeriesChatRoom #oneplus13#specs#oxygenos