Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Remove typing from the stdlib

Antoine Pitrousolipsis at pitrou.net
Fri Nov 3 13:47:38 EDT 2017


On Fri, 3 Nov 2017 12:46:33 -0400"Eric V. Smith" <eric at trueblade.com> wrote:> On 11/3/2017 12:15 PM, Victor Stinner wrote:> > Hi,> >> > 2017-11-03 15:36 GMT+01:00 Guido van Rossum <guido at python.org>:> >> Maybe we should remove typing from the stdlib?> >>https://github.com/python/typing/issues/495>> > The typing module is not used yet in the stdlib, so there is no> > technically reason to keep typing part of the stdlib. IMHO it's> > perfectly fine to keep typing and annotations out of the stdlib, since> > the venv & pip tooling is now rock solid ;-)>> I'm planning on using it for PEP 557:>https://www.python.org/dev/peps/pep-0557/#class-variables>> The way the code currently checks for this should still work if typing> is not in the stdlib, although of course it's assuming that the name> "typing" really is the "official" typing library.I don't think other modules should start relying on the typing module atruntime.The dataclasses module can define its own "ClassVar" thing and then Isuspect it's easy to map it to typing._ClassVar.  It seems we should becareful not to blur the distinction between declarations that have aneffect on actual code, and typing declarations which only affecttype-checking tools.RegardsAntoine.


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp