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
Auf dieser Seite können Sie das Online-Video Python magic methods - __str__(), __repr__() and __format__() mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer introvert_it 12 November 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 154 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!