Open Eneroth3 opened 3 years ago
I still feel better docs and aliasing the "is2d" methods as "gluable" would prevent most confusion, without the "noise" of console warnings.
The warning would only show up for incorrect usage where raise really is more idiomatic. Raising would however risk breaking existing code that expects a silent failure from these two methods. If you first set is2d/gluable to true before setting a property that depends on it, you will not see any warnings.
But then what if you wish to switch off gluing, but leave the type of gluing set ? No warning is issued.
I see this a "nanny-API" and unnecessary.
Proper documentation is the key. But a combo setter method could be added that also sets is2d true
, such as:
cdef.set_gluing(snap_to_type)
Continuing from #256, Behavior#snapto= and Behavior#cuts_opening= should warn if used when gluing ("is2d?") is false.