On Wed, Aug 05, 2020 at 02:42:34PM -0400, David Mertz wrote:
> Here's something I think could be more useful (again, I'm +0 at best > myself). > > >>> @unit("meter") a = 3 # a = unit("meter")("a", 3) Why does the measurement "3 metres" need to know that it is bound to the target name "a"? If you then did: x = a y = a + unit('metre')('b', 0) what would x.name and y.name be? And when would you need to know that? If we're talking about associating units to measurements, surely we don't need anything more than function call syntax or operators: # Something like one or more of these a = unit('metre', 3) b = metres(3) g = 9.8 * metres / seconds**2 for declaring units. -- Steven _______________________________________________ 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/DPNDAN2WVQZUODG2CWE2SIUJULMCUIFD/ Code of Conduct: http://python.org/psf/codeofconduct/