From bffbbc21d93ce19bac1af94d4ac8939851e15e9a Mon Sep 17 00:00:00 2001 From: SPKorhonen Date: Mon, 8 Jul 2024 17:13:45 +0300 Subject: [PATCH] =?UTF-8?q?Add=20=E2=84=93=20as=20alternative=20for=20lite?= =?UTF-8?q?r=20(#2014)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES | 1 + pint/default_en.txt | 2 +- pint/testsuite/test_issues.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e2999fddb..37ca16b87 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,7 @@ Pint Changelog 0.25 (unreleased) ----------------- +- Added ℓ as alternative for liter - Support permille units and `‰` symbol (PR #2033, Issue #1963) diff --git a/pint/default_en.txt b/pint/default_en.txt index 68160a983..c87c5f0d5 100644 --- a/pint/default_en.txt +++ b/pint/default_en.txt @@ -222,7 +222,7 @@ hectare = 100 * are = ha # Volume [volume] = [length] ** 3 -liter = decimeter ** 3 = l = L = litre +liter = decimeter ** 3 = l = L = ℓ = litre cubic_centimeter = centimeter ** 3 = cc lambda = microliter = λ stere = meter ** 3 diff --git a/pint/testsuite/test_issues.py b/pint/testsuite/test_issues.py index f726a950c..760b886f7 100644 --- a/pint/testsuite/test_issues.py +++ b/pint/testsuite/test_issues.py @@ -408,6 +408,9 @@ def test_micro_creation_U03bc(self, module_registry): def test_micro_creation_U00b5(self, module_registry): module_registry.Quantity(2, "µm") + def test_liter_creation_U2113(self, module_registry): + module_registry.Quantity(2, "ℓ") + @helpers.requires_numpy def test_issue171_real_imag(self, module_registry): qr = [1.0, 2.0, 3.0, 4.0] * module_registry.meter