If I'm going to be changing the default index base to 1 (#231), it dawns on me that it's going to be very confusing to users for well #1 to print out as Well[0], because that's what it thinks of itself as internally. So it will be necessary to add a facility for printing values. We will want to use this for
interactive command results
print actions
EvaluationError exceptions
string addition. (Note that currently only strings and numbers can be added to strings. It really should be ANY on either side.
The simplest way to add the forms may be to add an attribute to the various types (e.g., Pad, Well, etc.), taking the object and the Environment, with a default that just calls str() hung off of type.
Migrated from internal repository. Originally created by @EvanKirshenbaum on Feb 05, 2023 at 9:54 AM PST.
If I'm going to be changing the default
index base
to1
(#231), it dawns on me that it's going to be very confusing to users forwell #1
to print out asWell[0]
, because that's what it thinks of itself as internally. So it will be necessary to add a facility for printing values. We will want to use this forprint
actionsEvaluationError
exceptionsANY
on either side.The simplest way to add the forms may be to add an attribute to the various types (e.g.,
Pad
,Well
, etc.), taking the object and theEnvironment
, with a default that just callsstr()
hung off oftype
.Migrated from internal repository. Originally created by @EvanKirshenbaum on Feb 05, 2023 at 9:54 AM PST.