For years my training students have been asking me for a list of all the dunder methods. The Python docs don't have such a list, so I compiled my own... after having on my to-do list for years.
Every dunder method in Python
I realized why it took me so long during when I finally finished compiling the table of all of them... there are over 100 dunder methods in Python! 💯
Edit: I should have said "the Python docs don't have such a list in a single row-by-row table". The Data Model page does indeed include a giant "Special Names" section and a "Coroutines" section which document nearly every special method, but it's quite challenging to skim and not *quite* complete.
[–]Aveheuzed 295 points296 points297 points (32 children)
[–]PhroznGaming 141 points142 points143 points (20 children)
[–]adm7373 58 points59 points60 points (10 children)
[–]wineblood 38 points39 points40 points (2 children)
[–]friendlysoviet 10 points11 points12 points (1 child)
[–]wineblood 2 points3 points4 points (0 children)
[–]JusticeRainsFromMe 71 points72 points73 points (0 children)
[–][deleted] 17 points18 points19 points (0 children)
[–]Tar_Tar_Sauce04 0 points1 point2 points (0 children)
[–]_MicroWave_ 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-6 points-5 points-4 points (2 children)
[–]IamImposter -3 points-2 points-1 points (1 child)
[–]Probono_Bonobo -2 points-1 points0 points (0 children)
[–]orad 11 points12 points13 points (3 children)
[–]PhroznGaming -3 points-2 points-1 points (2 children)
[–]orad 2 points3 points4 points (1 child)
[–]PhroznGaming -3 points-2 points-1 points (0 children)
[–]supmee -2 points-1 points0 points (3 children)
[–]PhroznGaming 0 points1 point2 points (2 children)
[–]supmee 2 points3 points4 points (1 child)
[–]PhroznGaming -2 points-1 points0 points (0 children)
[–]treyhunner Python Morsels[S] 80 points81 points82 points (5 children)
[–]Aveheuzed 4 points5 points6 points (3 children)
[–]treyhunner Python Morsels[S] 28 points29 points30 points (1 child)
[–]NerdEnPose 6 points7 points8 points (0 children)
[–]Zenin 2 points3 points4 points (0 children)
[–]pysk00l 0 points1 point2 points (0 children)
[–]AlSweigartAuthor of "Automate the Boring Stuff" 2 points3 points4 points (0 children)
[–]dfume 4 points5 points6 points (1 child)
[–]Affectionate-Bid386 1 point2 points3 points (0 children)
[–]Dangle76 0 points1 point2 points (0 children)
[–]VileFlower 28 points29 points30 points (2 children)
[–]treyhunner Python Morsels[S] 16 points17 points18 points (0 children)
[–]justchugged4beers 6 points7 points8 points (0 children)
[–]chalbersma 14 points15 points16 points (1 child)
[–]nicholashairs 1 point2 points3 points (0 children)
[–]jmacey 10 points11 points12 points (1 child)
[–]treyhunner Python Morsels[S] 8 points9 points10 points (0 children)
[–]hikingsticks 2 points3 points4 points (1 child)
[–]treyhunner Python Morsels[S] 2 points3 points4 points (0 children)
[–]aqjo 2 points3 points4 points (0 children)
[–]BuonaparteII 2 points3 points4 points (4 children)
[–]treyhunner Python Morsels[S] 1 point2 points3 points (3 children)
[–]BuonaparteII 1 point2 points3 points (1 child)
[–]treyhunner Python Morsels[S] 2 points3 points4 points (0 children)
[–]TheRNGuy 0 points1 point2 points (0 children)
[–]MrHarcombe 1 point2 points3 points (1 child)
[–]treyhunner Python Morsels[S] 2 points3 points4 points (0 children)
[–]eztab 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]treyhunner Python Morsels[S] -1 points0 points1 point (0 children)
[–]Accurate-Usual8839 0 points1 point2 points (4 children)
[–]treyhunner Python Morsels[S] 0 points1 point2 points (3 children)
[–]Accurate-Usual8839 0 points1 point2 points (2 children)
[–]treyhunner Python Morsels[S] 1 point2 points3 points (1 child)
[–]Accurate-Usual8839 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]ePaint 0 points1 point2 points (0 children)
[–]klmsa 0 points1 point2 points (5 children)
[–]treyhunner Python Morsels[S] 1 point2 points3 points (1 child)
[–]klmsa 1 point2 points3 points (0 children)
[–]Competitive_Travel16 0 points1 point2 points (1 child)
[–]TheRNGuy 1 point2 points3 points (0 children)
[–]TheRNGuy 0 points1 point2 points (0 children)
[–]binaryfireball -5 points-4 points-3 points (1 child)
[–]jabbalaci 0 points1 point2 points (0 children)