Closed sbellem closed 5 years ago
thanks, is there a way to make the attribute read only?
thanks, is there a way to make the attribute read only?
Oh, that is a very good point. Will do!
@wbolster See re-worked commit. The DB.name
attribute is now readonly
at the Python level. There is a small test to check that an error is raised if one attempts to change the name
.
Just in case that helps, I found the following docs useful https://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#static-attributes.
can you add the documentation to the api docs with a proper version tag? (use 1.1.0)
Yes!
@wbolster Added docs with a note about the version. Let me know if anything else needs to be done.
Related to issue #88.
The
DB.name
attribute is not exposed at the Python level and could sometimes be useful. One example, is the deletion of a DB instance for which thename
has not been "cached" at creation time. One could get the name by parsingDB.__str__()
orDB.__repr__()
but why not directly fromDB.name
?