Python Forum
Hi, looking for "dunder" tutorials.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hi, looking for "dunder" tutorials.
#1
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
Reply
#2
You may look at Basic customization. Is that what you mean?
Reply
#3
Here's a bit, not vouching for any they may be excellent or poor:
https://github.com/python/cpython/blob/m...uiltins.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/...-in-python
https://micropyramid.com/blog/python-spe...c-methods/
Reply
#4
Not a tutorial, but an amazing list of the dunders. Basically go to python.org and search for __

Docs link
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dunder Methods menator01 8 1,791 Mar-24-2022, 03:58 AM
Last Post: deanhystad
  Zlib tutorials Vwjap 2 2,342 Mar-13-2021, 09:22 PM
Last Post: Vwjap
  I do not understand why my python looks different from tutorials. noodlespinbot 2 5,044 Oct-12-2019, 09:56 PM
Last Post: noodlespinbot
  Python Modules and Tutorials marienbad 1 2,185 Jan-31-2019, 08:36 PM
Last Post: ichabod801
  mpi4py examples/tutorials MuntyScruntfundle 1 2,652 Dec-01-2018, 10:22 PM
Last Post: Larz60+
  in tutorials: Never use "for i in range(len(sequence)): Skaperen 1 3,816 Oct-07-2016, 05:05 AM
Last Post: Mekire

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020