Feat(Core): Change default str function for MO
This commit is contained in:
@@ -84,6 +84,8 @@ def mul2txt(left, right):
|
||||
>>> a = MO.factory('x')
|
||||
>>> mul2txt(MO.factory(3), a)
|
||||
'3x'
|
||||
>>> mul2txt(MO.factory(-3), a)
|
||||
'- 3x'
|
||||
>>> mul2txt(a, a)
|
||||
'x * x'
|
||||
"""
|
||||
@@ -92,8 +94,11 @@ def mul2txt(left, right):
|
||||
left_ = render_with_parenthesis(left, "*")
|
||||
right_ = render_with_parenthesis(right, "*")
|
||||
|
||||
if (right_[0].isalpha() and (left_.isnumeric() or left_.isdecimal())) or \
|
||||
right_[0] == '(':
|
||||
if right_[0].isalpha():
|
||||
# TODO: C'est bien beurk en dessous... |ven. déc. 21 12:03:07 CET 2018
|
||||
if type(left).__name__ == 'MOnumber':
|
||||
display_time = False
|
||||
elif right_[0] == '(':
|
||||
display_time = False
|
||||
|
||||
if display_time:
|
||||
|
||||
Reference in New Issue
Block a user