Description
Update all documentation and examples to show the recommended pattern of capturing the return value from add_layer() instead of using dictionary lookup.
Before (current pattern):
black_pen_layer = "black_pen_layer"
plotter.add_layer(black_pen_layer, color="black")
plotter.layers[black_pen_layer].add_rectangle(...)
After (recommended pattern):
black_pen = plotter.add_layer("black_pen", color="black")
black_pen.add_rectangle(...)
Benefits:
- Full IntelliSense support
- No string variables needed
- Type checker validates method calls
- Supports method chaining
Files to Update
Acceptance Criteria
Description
Update all documentation and examples to show the recommended pattern of capturing the return value from
add_layer()instead of using dictionary lookup.Before (current pattern):
After (recommended pattern):
Benefits:
Files to Update
README.mddocs/index.mdCONTRIBUTORS.mdsandbox/main.pyAcceptance Criteria