josiahcarlson / mprop

Module properties for Python
GNU Lesser General Public License v2.1
24 stars 0 forks source link

_pmodule not found #5

Closed CodingOctocat closed 1 year ago

CodingOctocat commented 1 year ago

i can't using _pmodule to access property in self module.

josiahcarlson commented 1 year ago

Can you show the code you are using?

Are you using Python 3.7+? Because there you can use normal deferred attributes, as per: https://peps.python.org/pep-0562/ , which should solve your problems more consistently.

CodingOctocat commented 1 year ago

I use Python 3.10,The code is the same as the README.rst.

josiahcarlson commented 1 year ago

You should not use this module, and should instead use Python 3.7+ and __getattr__ as described https://peps.python.org/pep-0562/, and as linked in the first paragraph of https://github.com/josiahcarlson/mprop#readme .

To quote myself in the 2nd paragraph, "unless there is something major, this project is mostly for historical purposes".

CodingOctocat commented 1 year ago

You are right, I used methods instead of properties for convenience.