Python Validation and Error Handling
Add a Draft Tag without Changing the Original
BOTIE
Examples, experiments and workspace controls
Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.
Try your own inputs
Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.
Context for this challenge
Return the original and draft records before editing either one. Both should still contain the current original tags.
The north report has tags ["raw"]. A reviewed draft needs ["raw", "checked"], while the original must still have ["raw"]. Copying the outer record alone can leave both reports sharing one tag list.
Inspect the component calculation
Copy the report( Original report: Original report Copy: nested values too )
Examples and results
- Original report
- house
- north
- tags
- 0raw
- Required result
- original
- house
- north
- tags
- 0raw
- draft
- house
- north
- tags
- 0raw
- Original report
- house
- west
- tags
[]
- Required result
- original
- house
- west
- tags
[]
- draft
- house
- west
- tags
[]
Try a fresh construction
This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.
Stuck? Inspect a worked construction
The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.
Assumptions and test precision
Sharing is demonstrated inside a private copy of the example. The actual input stays unchanged. Python exercises check real object ownership and deep copies. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.
Review a Report with More Existing Tags
This check uses the pieces from “Make the Draft Independent”.
BOTIE
- Original report
- house
- east
- tags
- 0raw
- 1night
- 2urgent
- Tag for the draft
ready
Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
Why can two separate records still show the same unexpected edit?
Check what a copy shares before changing a nested value.
Sharing is demonstrated inside a private copy of the example. The actual input stays unchanged. Python exercises check real object ownership and deep copies.