This video is about different magic methods handling different string representations of class instances. __str__() for returning user-oriented information about the instance, __repr__() - to get debugging information about the object and __format__() to handle formatted instance output.
Links:
About magic methods:
https://rszalski.github.io/magicmethods/
String formatting:
https://pyformat.info/
Today's video code:
https://bitbucket.org/introvert-it1/p...
Chapters:
0:00 Intro
1:04 __repr__() magic method
6:04 __str__() magic method and difference with __repr__()
15:26 __format__() magic method
23:26 Conclusions
--
LinkedIn community:
/ 9393328
Discord server:
/ discord
Check out our upcoming courses:
https://introvert-it.com/
Contact us if you want to participate in a stream or you have any questions:
info@introvert-it.com
#str #string #repr #représentation #representation #format #format() #__str__ #__format__ #__repr__ #dundler #class #objectorientedprogramming #object #dynamic #magicmethod #magic #method #pythonchallenge #python #coding #tutorial #tutorials #programming #computerscience #video #codingproblems #howto #hints #tips #tricks #tipsandtricks #manual #handling #skills #skill #code #solve #solution #advice #recipe
Sur cette page du site, vous pouvez voir la vidéo en ligne Python magic methods - __str__(), __repr__() and __format__() durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur introvert_it 12 novembre 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 154 fois et il a aimé 6 téléspectateurs. Bon visionnage!