After running 2to3

This commit is contained in:
Grant Sanderson
2018-08-09 17:56:05 -07:00
parent 06a65190e7
commit 858051a806
172 changed files with 2117 additions and 2221 deletions

View File

@ -22,14 +22,14 @@ def get_equation(index, x = 2, y = 3, z = 8, expression_only = False):
return TexMobject(tex).set_color(OPERATION_COLORS[index])
def get_inverse_rules():
return map(TexMobject, [
return list(map(TexMobject, [
"x^{\\log_x(z)} = z",
"\\log_x\\left(x^y \\right) = y",
"\\sqrt[y]{x^y} = x",
"\\left(\\sqrt[y]{z}\\right)^y = z",
"\\sqrt[\\log_x(z)]{z} = x",
"\\log_{\\sqrt[y]{z}}(z) = y",
])
]))
def get_top_inverse_rules():
result = []
@ -283,9 +283,9 @@ class SixDifferentInverses(Scene):
top_rule.set_height(1.5)
top_rule.center()
top_rule.shift(rule.get_center())
self.play(*map(FadeOut, rules))
self.play(*list(map(FadeOut, rules)))
self.remove(*rules)
self.play(*map(GrowFromCenter, top_rules))
self.play(*list(map(GrowFromCenter, top_rules)))
self.wait()
self.remove(general_idea)
rules = get_inverse_rules()
@ -395,10 +395,7 @@ class AdditiveProperty(Scene):
ApplyMethod(log_rule.set_color, RED),
)
self.wait()
all_tops = filter(
lambda m : isinstance(m, TOP),
t_exp_rule.split()+t_log_rule.split()
)
all_tops = [m for m in t_exp_rule.split()+t_log_rule.split() if isinstance(m, TOP)]
self.put_in_circles(all_tops)
self.set_color_appropriate_parts(t_exp_rule, t_log_rule)