[issue25374] Deficiencies in type hint usage in Python standard libraries
New submission from John Michael Lafayette: I love the new type hint feature in Jetbrains IDE (PEP 0484). Now when my user defined methods return a value, I can press (Crtl+space) and see the type of that value and all its methods. Also, when I pass the wrong type in, I get a warning. Oddly, this does not happen with Python standard library functions. I can't get the auto-complete on objects returned by the Python standard library. The Python standard library doesn't warn me in advance if I put the wrong type in a method. How does that make sense? Please support PEP 0484 by using it in the Python standard library where appropriate. -- assignee: docs@python components: Documentation messages: 252758 nosy: John Michael Lafayette, docs@python priority: normal severity: normal status: open title: Deficiencies in type hint usage in Python standard libraries type: behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25374> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25350] Stronger type enforcement (feature request)
New submission from John Michael Lafayette: With a lot of languages, I can tell that the type I am getting is an instance of the declared type I'm assigning it to. Example: Cat c = Factory.make("cat" Animal d = Factory.make("dog") Python: val c = Factory.make("cat") Problem with this is that it is not necessarily obvious to the reader what the type of c is. I suggest that you provide an option to strengthen python's type checking by allowing users to replace val with the expected type of the object and then allow the interpreter to check that the real type being assigned is an instance of the expected type. An option like -strong for strong typing. -- messages: 252588 nosy: John Michael Lafayette priority: normal severity: normal status: open title: Stronger type enforcement (feature request) type: enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com