Require a SweepSource in a sweep's source position - #41
Conversation
Sweep now takes a source and nothing else. A sequence of points raises a ValidationError naming Values() and .from_values(), so the block always holds something that can answer its own length and kind and write itself back out to .qp.
AI AnalysisPurpose of the changes:Refactor the handling of sweep sources in the Sweep class to enforce stricter validation, replacing the acceptance of bare sequences with explicit requirements for SweepSource objects.
|
AI Analysis
Purpose of the changes:The changes improve the documentation and error messages related to the
|
AI Analysis
Purpose of the changes:Refactor test case to improve readability by reusing variable for source.
|
AI Analysis
Purpose of the changes:Clarifying the usage of sweep sources and builders in the control flow documentation.
|
|



QProgram.sweep()and theSweepblock now take aSweepSourceand nothing else. A sequence of points in the source position raises aValidationErrornaming the two spellings that pick explicit values,sweep(variable, qp.Values([...]))andsweep(variable).from_values([...]). The combinators are unaffected, and so is the.qpbracket literal, which still reads back asValues.