[Python-ideas] Proposal to add const-ness type hints to PEP-484
wes.turner at gmail.com
Mon Jul 11 14:08:52 EDT 2016
"Persistent / Immutable / Functional data structures for Python"
IIRC, there are a number of threads discussing adding const as a language
feature? It may be worth linking those here / in the gh issue? IIUC, the
linked proposal describes adding const as an annotation feature for static
Would const as a language feature have any effect on the gilectomy? e.g.
less locks required
Ways to achieve practical runtime const (~immutability):
* add a has_key() check in __setattr__
* define an @property without a propname.setter (for a __dunder_prefixed
class attr which will otherwise be name-mangled)
* const as a language feature
* from typing import Const
this would be a great hint for static analysis, but would things really
On Jul 11, 2016 12:43 PM, "Siva Chandra via Python-ideas" <
python-ideas at python.org> wrote:
> I have submitted a proposal to add const-ness type hint constructs
> here: https://github.com/python/typing/issues/242
> Looking for feedback on the proposal.
> Siva Chandra
> Python-ideas mailing list
> Python-ideas at python.org
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas