On Thu, Sep 27, 2018 at 5:07 AM Chris Barker <chris.bar...@noaa.gov> wrote: > > On Tue, Sep 25, 2018 at 10:10 PM Lee Braiden <leebr...@gmail.com> wrote: >> >> It's the reason why type checking exists, and why bounds checking exists, >> and why unit checking exists too. > > And yet Python has none of those. They all provide safety, but also place a > burden on the developer.
Type checking? Depends on your definition. Since objects are typed, Python is safe against the old "I passed an integer when it expected an array" problem (which probably would result in a junk memory read, in C), whether the function's arguments are type-checked or not. And if you want actual type checking, that's available too, just not as part of the core language (and it has language support for its syntax). Bounds checking? Most definitely exists. If you try to subscript a string or list with a value greater than its length, you get an exception. Unit checking? If that's "unit testing", that's part of the standard library, so yes, that definitely exists in Python. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/