'Draw a circle with given radius.
Arguments:
radius -- a number
extent (optional) -- a number
steps (optional) -- an integer
Draw a circle with given radius. The center is radius units left
of the turtle; extent - an angle - determines which part of the
circle is drawn. If extent is not given, draw the entire circle.
If extent is not a full circle, one endpoint of the arc is the
current pen position. Draw the arc in counterclockwise direction
if radius is positive, otherwise in clockwise direction. Finally
the direction of the turtle is changed by the amount of extent.
As the circle is approximated by an inscribed regular polygon,
steps determines the number of steps to use. If not given,
it will be calculated automatically. Maybe used to draw regular
polygons.
call: circle(radius)                  # full circle
--or: circle(radius, extent)          # arc
--or: circle(radius, extent, steps)
--or: circle(radius, steps=6)         # 6-sided polygon
Example (for a Turtle instance named turtle):
>>> turtle.circle(50)
>>> turtle.circle(120, 180)  # semicircle'

def circle(self, radius, extent=None, steps=None):

    if self.undobuffer:
        self.undobuffer.push(['seq'])
        self.undobuffer.cumulate = True
    speed = self.speed()
    if (extent is None):
        extent = self._fullcircle
    if (steps is None):
        frac = (abs(extent) / self._fullcircle)
        steps = (1 + int((min((11 + (abs(radius) / 6.0)), 59.0) * frac)))
    w = ((1.0 * extent) / steps)
    w2 = (0.5 * w)
    l = ((2.0 * radius) * math.sin((((w2 * math.pi) / 180.0) * self._degreesPerAU)))
    if (radius < 0):
        (l, w, w2) = ((- l), (- w), (- w2))
    tr = self.tracer()
    dl = self._delay()
    if (speed == 0):
        self.tracer(0, 0)
    else:
        self.speed(0)
    self._rotate(w2)
    for i in range(steps):
        self.speed(speed)
        self._go(l)
        self.speed(0)
        self._rotate(w)
    self._rotate((- w2))
    if (speed == 0):
        self.tracer(tr, dl)
    self.speed(speed)
    if self.undobuffer:
        self.undobuffer.cumulate = False
