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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #345 · 9 окт.

Функция 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

Резултати

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

Пребарај: #yjs

当前筛选 #yjs清除筛选
GitHub Trends

@githubtrending · Post #15258 · 01.11.2025 г., 13:30

#python#blocknotejs#collaborative#django#documentation#g2g#government#knowledge#knowledge_base#mit#mit_license#opensource#reactjs#realtime_collaboration#self_hosted#wiki#yjs Docs is a collaborative online text editor that helps you and your team write, edit, and organize documents together in real time, even offline. It offers easy formatting, AI tools like summarizing and rephrasing, and secure sharing with controlled access. You can export documents in various formats and create structured knowledge with subpages. Docs is open source, easy to self-host, and used by public organizations, ensuring your data stays secure and private. This tool saves time, improves teamwork, and turns your notes into organized knowledge you can access anytime. It’s great for teams wanting efficient, secure, and collaborative document editing. https://github.com/suitenumerique/docs