permutation: clean up DisjointCycle
permutation: clean up DisjointCycle

Thanks to Tom Bachmann for the help in cleaning this up.

Also, dict is used instead of defaultdict since it, too, allows
for a __missing__ method. The printing of the DisjointCycle
as something other than a dict in doctests has not been resolved,
i.e. in doctests

>>> DisjointCycle(1,2)
{1: 2, 2: 1}

while during an interactive session this would give [(1, 2)].

shipci/sympy,kumarkrishna/sympy,bukzor/sympy,jaimahajan1997/sympy,grevutiu-gabriel/sympy,MechCoder/sympy,cswiercz/sympy,AkademieOlympia/sympy,asm666/sympy,shikil/sympy,dqnykamp/sympy,abloomston/sympy,sampadsaha5/sympy,atreyv/sympy,moble/sympy,kaushik94/sympy,lidavidm/sympy,atsao72/sympy,jerli/sympy,ahhda/sympy,meghana1995/sympy,sahmed95/sympy,Gadal/sympy,pbrady/sympy,postvakje/sympy,ahhda/sympy,diofant/diofant,beni55/sympy,skidzo/sympy,atreyv/sympy,iamutkarshtiwari/sympy,mafiya69/sympy,skidzo/sympy,toolforger/sympy,shipci/sympy,lidavidm/sympy,kaichogami/sympy,drufat/sympy,Mitchkoens/sympy,yashsharan/sympy,Shaswat27/sympy,jaimahajan1997/sympy,cccfran/sympy,farhaanbukhsh/sympy,kmacinnis/sympy,debugger22/sympy,amitjamadagni/sympy,shikil/sympy,ga7g08/sympy,sahmed95/sympy,sampadsaha5/sympy,AunShiLord/sympy,Sumith1896/sympy,yukoba/sympy,dqnykamp/sympy,Arafatk/sympy,ChristinaZografou/sympy,maniteja123/sympy,vipulroxx/sympy,kaichogami/sympy,pandeyadarsh/sympy,aktech/sympy,abhiii5459/sympy,beni55/sympy,hrashk/sympy,liangjiaxing/sympy,ChristinaZografou/sympy,jerli/sympy,VaibhavAgarwalVA/sympy,vipulroxx/sympy,iamutkarshtiwari/sympy,sunny94/temp,jbbskinny/sympy,hargup/sympy,Vishluck/sympy,abhiii5459/sympy,kmacinnis/sympy,wanglongqi/sympy,jamesblunt/sympy,aktech/sympy,kevalds51/sympy,Curious72/sympy,farhaanbukhsh/sympy,MechCoder/sympy,postvakje/sympy,beni55/sympy,kaushik94/sympy,Arafatk/sympy,debugger22/sympy,oliverlee/sympy,kmacinnis/sympy,Davidjohnwilson/sympy,garvitr/sympy,kaushik94/sympy,hrashk/sympy,souravsingh/sympy,drufat/sympy,AkademieOlympia/sympy,madan96/sympy,skidzo/sympy,asm666/sympy,bukzor/sympy,chaffra/sympy,toolforger/sympy,postvakje/sympy,VaibhavAgarwalVA/sympy,bukzor/sympy,emon10005/sympy,Titan-C/sympy,dqnykamp/sympy,cccfran/sympy,drufat/sympy,pandeyadarsh/sympy,ChristinaZografou/sympy,asm666/sympy,AkademieOlympia/sympy,Davidjohnwilson/sympy,farhaanbukhsh/sympy,abhiii5459/sympy,jaimahajan1997/sympy,maniteja123/sympy,meghana1995/sympy,wanglongqi/sympy,madan96/sympy,Shaswat27/sympy,souravsingh/sympy,rahuldan/sympy,wanglongqi/sympy,Designist/sympy,cswiercz/sympy,kumarkrishna/sympy,liangjiaxing/sympy,skirpichev/omg,hargup/sympy,shikil/sympy,oliverlee/sympy,garvitr/sympy,jbbskinny/sympy,emon10005/sympy,jbbskinny/sympy,sahilshekhawat/sympy,Vishluck/sympy,Vishluck/sympy,MechCoder/sympy,maniteja123/sympy,saurabhjn76/sympy,hargup/sympy,hrashk/sympy,ahhda/sympy,moble/sympy,sunny94/temp,yashsharan/sympy,jamesblunt/sympy,moble/sympy,jamesblunt/sympy,mafiya69/sympy,MridulS/sympy,AunShiLord/sympy,mafiya69/sympy,yukoba/sympy,rahuldan/sympy,Gadal/sympy,pbrady/sympy,amitjamadagni/sympy,Mitchkoens/sympy,Davidjohnwilson/sympy,Designist/sympy,oliverlee/sympy,aktech/sympy,atreyv/sympy,debugger22/sympy,mcdaniel67/sympy,Titan-C/sympy,Gadal/sympy,Designist/sympy,mcdaniel67/sympy,sahilshekhawat/sympy,lidavidm/sympy,yashsharan/sympy,atsao72/sympy,saurabhjn76/sympy,toolforger/sympy,emon10005/sympy,atsao72/sympy,cccfran/sympy,lindsayad/sympy,lindsayad/sympy,AunShiLord/sympy,Sumith1896/sympy,Curious72/sympy,VaibhavAgarwalVA/sympy,kumarkrishna/sympy,wyom/sympy,Shaswat27/sympy,meghana1995/sympy,kaichogami/sympy,Arafatk/sympy,cswiercz/sympy,sunny94/temp,chaffra/sympy,abloomston/sympy,jerli/sympy,sampadsaha5/sympy,abloomston/sympy,madan96/sympy,wyom/sympy,chaffra/sympy,yukoba/sympy,vipulroxx/sympy,grevutiu-gabriel/sympy,iamutkarshtiwari/sympy,rahuldan/sympy,Sumith1896/sympy,Curious72/sympy,kevalds51/sympy,ga7g08/sympy,sahilshekhawat/sympy,mcdaniel67/sympy,liangjiaxing/sympy,wyom/sympy,kevalds51/sympy,saurabhjn76/sympy,MridulS/sympy,lindsayad/sympy,shipci/sympy,Titan-C/sympy,pbrady/sympy,grevutiu-gabriel/sympy,souravsingh/sympy,Mitchkoens/sympy,ga7g08/sympy,MridulS/sympy,pandeyadarsh/sympy,garvitr/sympy,sahmed95/sympy