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

@ -364,9 +364,9 @@ class IntroduceCircle(Scene):
radius.set_color(MAROON_B)
R = TexMobject("R").next_to(radius, UP)
area, circumference = words = VGroup(*map(TextMobject, [
area, circumference = words = VGroup(*list(map(TextMobject, [
"Area =", "Circumference ="
]))
])))
area.set_color(BLUE)
circumference.set_color(YELLOW)
@ -696,7 +696,7 @@ class IntroduceTinyChangeInArea(CircleScene):
expanded.shift(LEFT/2.)
faders = [area_brace, area_word, new_area_brace, new_area_word]
self.play(*map(FadeOut, faders))
self.play(*list(map(FadeOut, faders)))
trips = [
([0, 2, 8], pi_R_squared, plus),
([8, 0, 2, 1, 4, 5, 6, 7], two_pi_R_dR, plus2),
@ -824,13 +824,13 @@ class BuildToDADR(CircleScene):
)
self.wait()
self.play(*it.chain(
map(Write, [equals, two_pi_R, dR]),
map(FadeIn, [circum_text, circum_brace])
list(map(Write, [equals, two_pi_R, dR])),
list(map(FadeIn, [circum_text, circum_brace]))
))
self.wait()
self.play(*it.chain(
map(Write, [plus, pi, dR2, squared]),
map(FadeIn, [error_brace, error_text])
list(map(Write, [plus, pi, dR2, squared])),
list(map(FadeIn, [error_brace, error_text]))
))
self.wait(2)
self.change = change
@ -860,7 +860,7 @@ class BuildToDADR(CircleScene):
self.play(*it.chain(
[Write(term.frac_line) for term in terms],
map(MoveToTarget, [self.equals, self.plus])
list(map(MoveToTarget, [self.equals, self.plus]))
))
self.play(*[term.denom.restore for term in terms])
self.wait(2)
@ -945,9 +945,9 @@ class BuildToDADR(CircleScene):
error_brace.target = Brace(self.error_term.target)
error_text.target = error_brace.target.get_text("Truly tiny")
error_text.target.set_color(error_text.get_color())
self.play(*map(MoveToTarget, [
self.play(*list(map(MoveToTarget, [
error_brace, error_text, self.plus, self.error_term
]))
])))
self.wait()
difference_text = TextMobject(
@ -985,7 +985,7 @@ class BuildToDADR(CircleScene):
MoveToTarget(difference_arrow),
)
self.wait(2)
self.play(*map(FadeOut, [difference_text, difference_arrow]))
self.play(*list(map(FadeOut, [difference_text, difference_arrow])))
def elaborate_on_d(self):
arc = Arc(-np.pi, start_angle = -np.pi/2)
@ -1022,7 +1022,7 @@ class BuildToDADR(CircleScene):
Write(d),
self.pi_creature.change_mode, "speaking"
)
self.play(*map(Write, [arrow, ignore_error]))
self.play(*list(map(Write, [arrow, ignore_error])))
self.play(error_group.fade, 0.8)
self.wait(2)
equality_brace = Brace(VGroup(self.change.denom, self.circum_term))
@ -1033,7 +1033,7 @@ class BuildToDADR(CircleScene):
Write(equal_word, run_time = 1)
)
self.wait(2)
self.play(*map(FadeOut, [equality_brace, equal_word]))
self.play(*list(map(FadeOut, [equality_brace, equal_word])))
less_wrong_philosophy = TextMobject("``Less wrong'' philosophy")
less_wrong_philosophy.move_to(ignore_error, LEFT)
@ -1106,7 +1106,7 @@ class BuildToDADR(CircleScene):
self.wait()
self.play(*it.chain(
[mob.restore for mob in to_infs],
map(FadeOut, [bubble, bubble.content]),
list(map(FadeOut, [bubble, bubble.content])),
[randy.change_mode, "erm"],
[self.pi_creature.change_mode, "happy"],
))
@ -1465,10 +1465,10 @@ class DerivativeAsTangentLine(ZoomedScene):
dot.scale(0.1)
dot.move_to(graph_point)
self.play(*map(FadeIn, [
self.play(*list(map(FadeIn, [
self.little_rectangle,
self.big_rectangle
]))
])))
self.play(
self.little_rectangle.move_to,
graph_point+self.little_rect_nudge
@ -1556,7 +1556,7 @@ class DerivativeAsTangentLine(ZoomedScene):
self.note_R_value_of_point()
alphas = np.arange(0, 1, 0.01)
graph_points = map(self.graph.point_from_proportion, alphas)
graph_points = list(map(self.graph.point_from_proportion, alphas))
curr_graph_point = self.graph_point(R)
self.last_alpha = alphas[np.argmin([
np.linalg.norm(point - curr_graph_point)
@ -1600,7 +1600,7 @@ class DerivativeAsTangentLine(ZoomedScene):
self.play(ShowCreation(arrow))
self.play(dot.scale_in_place, 2, rate_func = there_and_back)
self.wait()
self.play(*map(FadeOut, [dashed_line, dot, arrow]))
self.play(*list(map(FadeOut, [dashed_line, dot, arrow])))
def state_commonality(self):
morty = Mortimer()
@ -1731,10 +1731,10 @@ class IntroduceConcentricRings(CircleScene):
moving_rings.generate_target()
moving_rings.target.set_stroke(width = 0)
plusses = VGroup(*[TexMobject("+") for ring in moving_rings])
area_sum = VGroup(*it.chain(*zip(
area_sum = VGroup(*it.chain(*list(zip(
[ring for ring in moving_rings.target],
plusses
)))
))))
dots_equals_area = TexMobject("\\dots", "=", "\\pi R^2")
area_sum.add(*dots_equals_area)
area_sum.arrange_submobjects()
@ -2028,13 +2028,13 @@ class GraphIntegral(GraphScene):
"x_max" : 4,
"x_tick_frequency" : 0.25,
"x_leftmost_tick" : -0.25,
"x_labeled_nums" : range(1, 5),
"x_labeled_nums" : list(range(1, 5)),
"x_axis_label" : "r",
"y_min" : -2,
"y_max" : 25,
"y_tick_frequency" : 2.5,
"y_bottom_tick" : 0,
"y_labeled_nums" : range(5, 30, 5),
"y_labeled_nums" : list(range(5, 30, 5)),
"y_axis_label" : "",
"dr" : 0.125,
"R" : 3.5,
@ -2122,7 +2122,7 @@ class GraphIntegral(GraphScene):
rectangles.save_state()
rectangles.stretch_to_fit_height(0)
rectangles.move_to(self.graph_origin, DOWN+LEFT)
self.play(*map(FadeOut, [arrows, values_words]))
self.play(*list(map(FadeOut, [arrows, values_words])))
self.play(
rectangles.restore,
Animation(ticks),
@ -2158,7 +2158,7 @@ class GraphIntegral(GraphScene):
ShowCreation(graph)
)
self.wait(3)
self.play(*map(FadeOut, [ticks, dr_brace, dr_text]))
self.play(*list(map(FadeOut, [ticks, dr_brace, dr_text])))
self.rectangles = rectangles
def thinner_rectangles(self):