[Tutor] dictionaries are same but returning false

Mats Wichmann mats at wichmann.us
Wed Jul 5 13:20:53 EDT 2017

On 07/05/2017 11:09 AM, Marc Tompkins wrote:
> On Wed, Jul 5, 2017 at 9:51 AM, Ashfaq <quazi.ashfaq at gmail.com> wrote:
>> Hi Peter,
>> The way you find the issue is really cool! Very cool! :)
> I agree - that is very cool.  But I have also made this sort of mistake a
> few times, and found it by using a very quick, low-tech method...
> "Unfold" the lines of the two dictionary specifications and put them one
> above the other - I usually just cut'n'paste into a text editor and delete
> the newlines.  If the two unfolded lines don't line up (which these
> wouldn't, because one has extra quotes in it) the error will be immediately
> visible.  Subtler typos will be harder to spot, but still much easier than
> trying to compare two folded paragraphs several lines apart.
> Not nearly as sophisticated, but sometimes quick'n'dirty is best.

but not terribly useful for dictionaries, which don't have any sense of
order (unless, of course you sort first, or use an ordered dict)

More information about the Tutor mailing list