Skip to content

Commit

Permalink
accepting the s attribute, but with a warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Nov 17, 2024
1 parent 491f15f commit c30b65b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sympy/printing/pretty/stringpict.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,26 @@ def root(self, index=None):

return result.left(root_sign, align="b")

@property
def s(self):
sympy_deprecation_warning(
("The attribute `s` of `StringPict` is deprecated since Sympy=1.14."
"Use `text` instead."),
deprecated_since_version="1.14",
active_deprecations_target="deprecated-pretty-printing-functions",
)
return self.text

@s.setter
def s(self, value):
sympy_deprecation_warning(
("The attribute `s` of `StringPict` is deprecated since Sympy=1.14."
"Use `text` instead."),
active_deprecations_target="deprecated-pretty-printing-functions",
)
self.text = value
return self.text

def subindex(self, sub_index):
"""Add a `subindex`.
Expand Down

0 comments on commit c30b65b

Please sign in to comment.