adding meshes in C does: Add Empty Mesh -> Enter Editmode -> Create Mesh while python does: Add Generated Mesh -> Enter Editmode problem with this is there is no empty undo state for undo-redo to use so it always gave a duplicate mesh on redo-ing. workaround by adding an empty mesh, do an undo push, and join the generated mesh into the empty one. this would be fixed if undo stack spanned modes.