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

Резултати

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

Пребарај: #mentalgrowth

当前筛选 #mentalgrowth清除筛选

Hard work is a must thing for success. Smart work is not a substitute for hard work, it is another wing of the bird which can take you to your success. In short, there is no substitute for hard work! You have to be ready for it. Put everything you have for what you want, This is the way of massive success! Problems are going to be there always! Tackle them. You have only two choices, one is EXCUSES and other is RESULTS. The choice is yours! Don’t sacrifice your dreams for temporary pleasure. Neither this pleasure is going to come with you nor this pain. Choose temporary pain for your permanent happiness. ⭐️ Give your 100% (not even 99%) for your dreams! Don’t run away from hard work. Thisis going to give you your dreams! ✨💪 #mentalGrowth#ipersonalgrowths#smarwork#hardwork

Fear or opportunity? Fears are the body's adequate reaction to something new, to something that once caused unpleasant consequences, or to something that directly or indirectly threatens one's life. But there are fears that simply must be overcome. For example, if you have an idea, but to implement it, you do not have the courage, and therefore and perseverance. It is behind such fears that lies your invaluable potential. The body never generates ideas that it doesn't have the resources to implement. Our thoughts are not random. Think of the opportunities that will open up before you after you overcome your fear. Have you imagined it? Now act! Join us for more -> @ipersonalgrowths💡 #MentalGrowth #Fear #opportunity #psychologyinformation