diff --git a/.gitignore b/.gitignore index a50ffc7..707388e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.swo .DS_Store res/ +activate # PyCharm .idea diff --git a/src/pyvalem/states/key_value_pair.py b/src/pyvalem/states/key_value_pair.py index 071cd0f..9b88904 100644 --- a/src/pyvalem/states/key_value_pair.py +++ b/src/pyvalem/states/key_value_pair.py @@ -55,5 +55,8 @@ def __repr__(self): @property def ordering(self): if self.key == "n": - return 0 - return ord(self.key) + # Move up n to the first position for ordering by replacing it with + # a space (ASCII 32, the first printable character and not a real valid + # key. + return " " + return self.key