On Wed, Oct 14, 2020 at 6:56 PM Ma Lin <malin...@163.com> wrote: > > > Second, why use bytes units? Not every integer value measures the amount of > > memory. If you multiply 2 bytes by 3 bytes, do you get 6 square bytes? > > If a code executes m_bytes * n_bytes, it's probably a logic error. > > If all values have a unit in a programming language, it might help us to > check such errors.
There ARE unit systems for Python, but the native int type deliberately doesn't have an associated unit. ChrisA _______________________________________________ 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/CW5IBM3QYDQ33IH2ZQQX5ZGROMB7FBHU/ Code of Conduct: http://python.org/psf/codeofconduct/