From 6c8ddeb3ac49b98e912941acabf1b2aa0e838889 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 7 Oct 2026 02:00:38 +0200 Subject: [PATCH] Answer prose round 2: street_delivery defines the postort's own prefix before using it, and its citation names what it covers --- data-import/geo-se.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data-import/geo-se.py b/data-import/geo-se.py index 449770e..6a6c8b4 100644 --- a/data-import/geo-se.py +++ b/data-import/geo-se.py @@ -135,10 +135,10 @@ class Nearest: def street_delivery(name, codes): - """The codes delivered to a street. Outside ONE_POSITION's cities, the digit after the postort's own prefix is 0 or 1 - for boxes and 8 for reply mail; inside them, a second digit 0 marks boxes. - Per docs/research/research-geo-se.md, Postal codes → Structure. - The postort's own prefix is three digits where one three-digit prefix starts at least half its codes, else two.""" + """The codes delivered to a street. A postort's own prefix is three digits where one three-digit prefix starts at + least half its codes, else two. Outside ONE_POSITION's cities, the digit after that prefix is 0 or 1 for boxes and 8 + for reply mail; inside them, a second digit 0 marks boxes. The box and reply-mail digits are per + docs/research/research-geo-se.md, Postal codes → Structure.""" if name in ONE_POSITION: return [c for c in codes if c[1] != "0"] largest = collections.Counter(c[:3] for c in codes).most_common(1)[0][1]