Constant modules are modules that often contains variables that you want to use in many places without relying on hard coded values. Sometime you store paths (often relatives).

Is it a good thing to use pathlib.Path() object is modules dedicated to constant?

Or is there anything that you should know before choosing to do so?

I would say the same question appears for using re.compile() in constants.

Any advise?

  • vrt3
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    I do that all the time.