Implement add() to add cnfvars to cnfvar lists directly from tuples
authorPlamen Dimitrov <plamen.dimitrov@intra2net.com>
Sat, 16 Apr 2022 15:11:32 +0000 (18:11 +0300)
committerPlamen Dimitrov <plamen.dimitrov@intra2net.com>
Wed, 11 May 2022 06:25:25 +0000 (09:25 +0300)
commitbee1c853b8cc3f33a609ef19935234eec425c316
treeebb343b0b9971ccba8678c0f31ded041c8783eaf
parent42c1b1d10c6ada308d75e2f57f0eacc25508a61c
Implement add() to add cnfvars to cnfvar lists directly from tuples

The CnfList class already has some functionality for initialization
directly from tuples and the Cnf class already has some functionality
like add_child() for adding a cnfvar from a tuple to Cnf instance's
CnfList instance children. To complete the syntactic sugar circle,
also provide the further possibility to add a CnfList item straight
from a tuple using add() instead of the more raw and manual append()
which can also handle both Cnf instances and tuples similarly to the
previous two options above.
src/cnfvar/model.py