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

Method fill

Lib/turtle.py:3429–3444  ·  view source on GitHub ↗

A context manager for filling a shape. Implicitly ensures the code block is wrapped with begin_fill() and end_fill(). Example (for a Turtle instance named turtle): >>> turtle.color("black", "red") >>> with turtle.fill(): ... turtle.circle(60)

(self)

Source from the content-addressed store, hash-verified

3427
3428 @contextmanager
3429 def fill(self):
3430 """A context manager for filling a shape.
3431
3432 Implicitly ensures the code block is wrapped with
3433 begin_fill() and end_fill().
3434
3435 Example (for a Turtle instance named turtle):
3436 >>> turtle.color("black", "red")
3437 >>> with turtle.fill():
3438 ... turtle.circle(60)
3439 """
3440 self.begin_fill()
3441 try:
3442 yield
3443 finally:
3444 self.end_fill()
3445
3446 def begin_fill(self):
3447 """Called just before drawing a shape to be filled.

Callers 14

_fill_textMethod · 0.45
_format_textMethod · 0.45
constructorMethod · 0.45
updateMethod · 0.45
_initMethod · 0.45
_initMethod · 0.45
d3.min.jsFile · 0.45
test_fillMethod · 0.45
printlistFunction · 0.45
fixdocFunction · 0.45

Calls 2

begin_fillMethod · 0.95
end_fillMethod · 0.95

Tested by 3

test_fillMethod · 0.36