Bone parenting without offset using Python?
Set basis and parent inverse to identity.
One of the simplest ways to do this is to set both the basis matrix and parent inverse matrix to identity, to ensure all transforms are those inherited directly.
Getting no feedback re what parenting &quot;without offset&quot; is, have included link to
https://blender.stackexchange.com/a/112856/15543 which has a number of methods to parent, either keeping current global location, (the operator result in question EDIT) or snapping to the transform of the parent as shown here..
The confusion is over the term offset. Code below puts an object at its parents transform with no &quot;offset&quot; from it, no local transforms.
Parenting, while maintaining the object in place, could be considered as setting the offset from child to parent, before parenting.  If turned on relationship lines are a visual rep'n of the parent to child offset.
Code below is same
as 'SNAP_IDENTITY'
import bpy
from mathutils import Matrix

ob = bpy.data.objects
child = ob['Cube']
parent = ob['Armature']
bone = parent.pose.bones['Bone']

child.parent = parent
child.parent_type = 'BONE'
child.parent_bone = bone.name

child.matrix_basis = Matrix() 
child.matrix_parent_inverse = Matrix()

Please also notice that the parent bone  setting requires the name of the bone, not the bone itself.