How to code bpy.context.object.data properly?

Finaly I wrote my first addon with one button to add one light. And now I want to set some properties (copied from the info panel). But that gives code in the format like: bpy.context.object.data, which is kind of relative and later Blender doesn’t understand where to is refered.

This is the part of the code:

def execute(self, context):
		bpy.ops.object.light_add(type='POINT', radius=1, view_align=False, location=(0, 0, 0))
		bpy.ops.transform.translate(value=(0, 0, 3.18139), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
		return {"FINISHED"}
		bpy.context.object.data.use_contact_shadow = True
		bpy.context.object.data.shadow_buffer_bias = 0.5
		bpy.context.object.data.shadow_buffer_bleed_bias = 0.2
		bpy.context.object.data.contact_shadow_bias = 0.09
		bpy.context.object.data.contact_shadow_distance = 1

Now how do I get the absolute adres of the light, and how do I code that?

Your “return” has to be at the end of the code.

@kkar, Yes I’ve seen it. but would that be enough?
I’ll check.

Update: yes, that works. Pffw, Eassier than I thought.
Thanks