Функция dir() - удобна для получения списка атрибутов у любого объекта.
Ранее я писал про функцию __dir__() в модуле (не путайте её с переменной __all__(), которая указывает список объектов для импорта если встречается конструкция from module import *).
Скорее всего вы уже знаете как использовать функцию dir(). Любой объект может реализовать метод __dir__() чтобы указать список имеющийхся и динамических атрибутов. И функция dir() поможет получить список этих атрибутов.
>>> dir(str)
['__add__', '__class__', '__contains__', ...]
У этой функции есть еще один способ применения. Её можно вызвать без аргумента, и в таком случае она вернёт список имён в текущем неймспейсе.
>>> dir()
['__builtins__', '__doc__', '__file__', ...]
>>> def test():
>>> x = 1
>>> print(dir())
>>> test()
['x']
#basic#tricks
Bliss - Official | Android 15 | Nothing Phone (2)
✍️ Details:
- Version: 18.5
- Codename: #Pong
- Released: 21/4/25
🔽Download:Vanilla | Vanilla(Mirror) (Recovery Build)
🆘 Support : Here
⚙️ Installation: Here
📸 Screenshots: Here
🔖 Tags : #ROM#AOSP#Official#Bliss#V
✨ ChangelogsROM | Device
✍️ Note:
- Vanilla only
- clean flash recommended
- you can use this gapps: here, or flash your choice of gapps/microg if you know what you're doing
- ksu disabled bcs of official requirements
🏆 Credits
- @Ghosuto7 for DT
- Hellboy for Meteoric kernel
- Fabian for PA Glyph Implementation
- Testers
😎 Maintainer : @Drishal
🔔 Updates : @NothingPhone2Updates
💬 Chat : @NothingPhone2
Bliss - Official | Android 15 | Nothing Phone (2)
✍️ Details:
- Version: 18.2
- Codename: #Pong
- Released: 29/1/25
🔽 Download: [ Vanilla | Gapps ] (Recovery Build)
🆘 Support : Here
⚙️ Installation: Here
📸 Screenshots: Here
✨ Source Changelogs: Here
🔖 Tags : #ROM#AOSP#Official#Bliss#V
✨ Changelogs
- Update to NOS V3.0-250113-1723 firmware
- Improvements to system performance and stability
✍️ Note:
- Both Gapps and Vanilla build available
🏆 Credits
- Chandu for base DT
- Hellboy for Meteoric kernel
- Fabian for PA Glyph Implementation
- Testers
- Note: bliss is not patched with ksu due to official requirements
😎 Maintainer : @Drishal
🔔 Updates : @NothingPhone2Updates
💬 Chat : @NothingPhone2