MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/turtledemo/planet_and_moon.py:36–45  ·  view source on GitHub ↗
(self, m, x, v, gravSys, shape)

Source from the content-addressed store, hash-verified

34
35class Star(Turtle):
36 def __init__(self, m, x, v, gravSys, shape):
37 Turtle.__init__(self, shape=shape)
38 self.penup()
39 self.m = m
40 self.setpos(x)
41 self.v = v
42 gravSys.planets.append(self)
43 self.gravSys = gravSys
44 self.resizemode("user")
45 self.pendown()
46 def init(self):
47 dt = self.gravSys.dt
48 self.a = self.acc()

Callers

nothing calls this directly

Calls 5

penupMethod · 0.80
resizemodeMethod · 0.80
pendownMethod · 0.80
setposMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected