On Tue, May 25, 2021 at 04:27:41PM +0100, Stestagg wrote:
> On Tue, May 25, 2021 at 4:02 PM Ethan Furman <et...@stoneleaf.us> wrote:

> > Optional typing != core Python.
> >
> >
> I mean, it's part of the standard library, so we could argue on personal
> definitions of 'core Python', but it would be more useful to work out
> exactly what aspects of typing.Final are lacking for you.

The actual enforcement perhaps?

Without mypy, which is not part of the standard library or core 
language, annotating something with typing has no more benefit than a 
naming convention -- and likely less, since naming conventions are 
visible every time you refer to the name, not just at the point of 
creation.


> Why would this constant annotation need to be more strongly enforced than
> type checks?  What actual benefit would this provide?

I guess that comes down to your position on how strongly you care about 
backwards compatibility for people who ignore your (not-so?) clear 
documentation.

If you take the Microsoft position of trying very hard not to break the 
code of people even if they have used undocumented internals or clearly 
documented private areas, you might want the interpreter to do more to 
discourage those practices. If you take the Apple position of not giving 
a damn whose code you break, then you might not.

-- 
Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/Q2C23LI3LWJNYJAXYGOCCAXPIZV3GW62/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to