Python - Get Object Attributes With a Dir Function

Published: 16 August 2021
on channel: 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  


On this page of the site you can watch the video online Python - Get Object Attributes With a Dir Function with a duration of hours minute second in good quality, which was uploaded by the user codevev 16 August 2021, share the link with friends and acquaintances, this video has already been watched 485 times on youtube and it was liked by 28 viewers. Enjoy your viewing!