Update Patterns/definitions.py for static variables authored by Paul Lovis Maximilian Trüstedt's avatar Paul Lovis Maximilian Trüstedt
A class is created for a certain type of static variable, holding values, that will be used regularly in the future.
``` python
class MediaRegionality(enum.Enum):
REGIONAL = "Regionales Medium"
NATIONAL = "Überregionales Medium"
```
Then the values can be used with a naming and a sort of classification attached to them, which increases readability.
``` python
media_regionality = {
"altmark zeitung": MediaRegionality.REGIONAL,
"antenne brandenburg": MediaRegionality.REGIONAL,
"apotheken-umschau.de": MediaRegionality.NATIONAL,
[...]
}
```
This also allows to change the values for every usage by changing only the static variable at creation, instead of all usages one by one.
\ No newline at end of file