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 слични објави

Пребарај: #occt

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

@githubtrending · Post #14824 · 12.06.2025 г., 12:00

#typescript#3d#browser_based#cad#geometry#occ#occt#opencascade#three#threejs#wasm#webassembly#webcad Chili3D is a free, open-source 3D CAD application that you can use directly in your web browser. It allows you to create and edit 3D models without needing to install any software on your computer. You can make basic shapes like boxes and spheres, draw 2D sketches, and perform advanced operations like combining shapes. It also includes tools for precise alignment and measurement. This makes it easy for anyone to design and edit 3D models online, which is helpful for both beginners and experienced users. https://github.com/xiangechen/chili3d