From bd5031bb8570c073fc2ebe5a0473559f0f670508 Mon Sep 17 00:00:00 2001 From: Michael Jung Date: Thu, 6 May 2021 16:46:41 +0200 Subject: [PATCH] Trac 31784: fix repr for destination maps --- src/sage/manifolds/differentiable/mixed_form.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/sage/manifolds/differentiable/mixed_form.py b/src/sage/manifolds/differentiable/mixed_form.py index e9fdcdb9916..aa4c89d9e8c 100644 --- a/src/sage/manifolds/differentiable/mixed_form.py +++ b/src/sage/manifolds/differentiable/mixed_form.py @@ -267,15 +267,25 @@ def _repr_(self): 'Mixed differential form F on the 3-dimensional differentiable manifold M' + Check whether :trac:`31784` is fixed:: + + sage: E3 = EuclideanSpace(3) + sage: S2 = E3.sphere() + sage: iota = S2.embedding() + sage: Omega = S2.mixed_form_algebra(dest_map=iota) + sage: Omega(1) + Mixed differential form one along the 2-sphere S^2 of radius 1 + smoothly embedded in the Euclidean space E^3 with values on the + Euclidean space E^3 via the map iota + """ desc = "Mixed differential form " if self._name is not None: desc += self._name + " " if self._dest_map is self._domain.identity_map(): - desc += "on the {}".format(self._domain) + desc += f"on the {self._domain}" else: - desc += "along the {} with values on the {} " - desc += desc.format(self._domain, self._ambient_domain) + desc += f"along the {self._domain} with values on the {self._ambient_domain} " if self._dest_map._name is None: dm_name = "unnamed map" else: