Python - Get Object Attributes With a Dir Function

Опубликовано: 16 Август 2021
на канале: codevev
485
28

#Python #Shorts
Sometimes, especially when working with other people's code, it may be nice to have a list of all class attributes (or properties). Python makes it really easy once again to accomplish this goal. All we need to do is call the built-in "dir" method on an instance of a class, and voila, we get the whole list of attributes.

-------------------------------------------------------------------------------------
Links:
Blog: https://evgenyurubkov.com
Twitter:   / evgenyurubkov  
Instagram:   / evgenyurubkov  
Youtube:    / @codevev  


На этой странице сайта вы можете посмотреть видео онлайн Python - Get Object Attributes With a Dir Function длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь codevev 16 Август 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 485 раз и оно понравилось 28 зрителям. Приятного просмотра!