Are there module level variables in Python?

Viewed 521

I am writing in caller script:

from XXX import config

....

config.limit = limit
data.load_data()

where config.py has

limit = None

inside and data.py has

from .config import *
...
def load_data():
    ...
    if limit is not None:
        limit_data(limit)

I was expecting everybody is refering the same varibale limit in config.py module. Unfortunately, I see while debygging, that load_data sees None limit, despite the fact it was set before.

Why?

1 Answers
Related