Dictionaries by definition have no order. That puts it into the dangerous "undefined behavior" zone - not a good idea to rely on it in anything you program, as it can change all of a sudden across implementations/instances. Even if it happens to work how you want now... it lays a landmine for you later.