![]() |
Hi, looking for "dunder" tutorials. - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Hi, looking for "dunder" tutorials. (/thread-24742.html) |
Hi, looking for "dunder" tutorials. - AlluminumFoil - Mar-02-2020 So I've used OOP a few times with classes and stuff, and I've used the __str__ and __repr__ dunders in the game I'm creating. I noticed there are more than one of these "dunders", and I don't actually know what any of them do. I can't find any good tutorials on youtube that I can actually follow along with, and my school blocks all kinds of things. Like if I need help with something, my school even blocks stackoverflow. If you guys could link me to a few good tutorials that aren't videos, that'd be great. Thank you RE: Hi, looking for "dunder" tutorials. - ibreeden - Mar-02-2020 You may look at Basic customization. Is that what you mean? RE: Hi, looking for "dunder" tutorials. - Larz60+ - Mar-02-2020 Here's a bit, not vouching for any they may be excellent or poor: https://github.com/python/cpython/blob/master/Lib/_sitebuiltins.py Search for 'Callable types' here: https://docs.python.org/3/reference/datamodel.html http://www.siafoo.net/article/57 https://rszalski.github.io/magicmethods/ https://www.tutorialsteacher.com/python/magic-methods-in-python https://micropyramid.com/blog/python-special-class-methods-or-magic-methods/ RE: Hi, looking for "dunder" tutorials. - jefsummers - Mar-02-2020 Not a tutorial, but an amazing list of the dunders. Basically go to python.org and search for __ Docs link |