Python - Get Object Attributes With a Dir Function

Pubblicato il: 16 agosto 2021
sul canale di: 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  


In questa pagina del sito puoi guardare il video online Python - Get Object Attributes With a Dir Function della durata di ore minuti seconda in buona qualità , che l'utente ha caricato codevev 16 agosto 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 485 volte e gli è piaciuto 28 spettatori. Buona visione!