On 4/04/22 10:20 am, Chris Angelico wrote:
import sys
sys.register_numeric_suffix("m", lambda n: unit(n, "meter"))
sys.register_numeric_suffix("mol", lambda n: unit(n, "mole"))

A global registry seems like a really bad idea. What if two
libraries want to use different, incompatible implementations
of units?

--
Greg
_______________________________________________
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/NWOGVNFEPA7K4JUGEGKRC4U7HVV4DWVS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to