User login

Python

Spotting and fixing problems caused by referencing the same object in memory

Here's a slightly simplified version of the code causing the problem— very slightly simplified; it really was about this short:

Python dictionary objects do not allow accessing of values with dot notation

Documenting this because it's the kind of frustrating mistake to solve that could drive someone away from Python entirely, yet it'll be a mistake i'll probably never make again and would be able to solve in seconds if i do.

A dictionary, or 'dict', must be accessed with bracket notation. Unlike JavaScript, dot notation is not an option for dicts.

This works:

Syndicate content