Using keyword initialization on a Sequence object, I find that the empty string is treated as equivalent to None, when they are different. This causes an error if I then try to append onto an empty sequence.
Minimal reproducing example:
import sbol3
doc = sbol3.Document()
sbol3.set_namespace('https://example.org')
s1 = sbol3.Sequence("foo", elements='')
s2 = sbol3.Sequence("foo")
s2.elements = ''
assert s1.elements == s2.elements # error: s1 is None rather than ''
Good catch. The test for whether an initial value was present was if initial_value:. Since '' converts to boolean False, the property constructor was ignoring the initial value of an empty string.
Using keyword initialization on a Sequence object, I find that the empty string is treated as equivalent to None, when they are different. This causes an error if I then try to append onto an empty sequence.
Minimal reproducing example: