'Call fill(True) before drawing a shape to fill, fill(False) when done.
Optional argument:
flag -- True/False (or 1/0 respectively)
Call fill(True) before drawing the shape you want to fill,
and  fill(False) when done.
When used without argument: return fillstate (True if filling,
False else)
Example (for a Turtle instance named turtle):
>>> turtle.fill(True)
>>> turtle.forward(100)
>>> turtle.left(90)
>>> turtle.forward(100)
>>> turtle.left(90)
>>> turtle.forward(100)
>>> turtle.left(90)
>>> turtle.forward(100)
>>> turtle.fill(False)'

def fill(self, flag=None):

    filling = isinstance(self._fillpath, list)
    if (flag is None):
        return filling
    screen = self.screen
    entry1 = entry2 = ()
    if filling:
        if (len(self._fillpath) > 2):
            self.screen._drawpoly(self._fillitem, self._fillpath, fill=self._fillcolor)
            entry1 = ('dofill', self._fillitem)
    if flag:
        self._fillitem = self.screen._createpoly()
        self.items.append(self._fillitem)
        self._fillpath = [self._position]
        entry2 = ('beginfill', self._fillitem)
        self._newLine()
    else:
        self._fillitem = self._fillpath = None
    if self.undobuffer:
        if (entry1 == ()):
            if (entry2 != ()):
                self.undobuffer.push(entry2)
        elif (entry2 == ()):
            self.undobuffer.push(entry1)
        else:
            self.undobuffer.push(['seq', entry1, entry2])
    self._update()
