How to write __annotations__ (scene property) in new scene? I have a scene with custom properties, written in a class, I am now able to access the values of these properties,
I would like to know how to write these values in a new scene. For example:

This is the properties:

class MySceneProperty(bpy.types.PropertyGroup):

    my_bool: BoolProperty(default=false)
    my_int: IntProperty(default=0)
    my_float: FloatProperty(default=0.0)

def register():

    bpy.types.Scene.scene_prop = bpy.props.PointerProperty(type=MySceneProperty)


I would like to create a new scene and use the previous parameters, as they could be changed by the default value, so the approach would be.

def my_function(self,context):
    first_scene = bpy.context.scene

    ###get attributes:
    for key in first_scene.scene_prop.__annotations__.keys():
        first_attributes = getattr(first_scene.scene_prop, key)

    ###new scene creation:
    new_scene= bpy.data.scenes.new("New scene")    
    context.window.scene = new_scene

    #Here I would like to set the attributes of the previous scene but I 
    #don't know how to do it

    ###set attributes???  (this obviously produces an error)

    for key in new_scene.scene_prop.__annotations__.keys():
        setattr(new_scene.scene_prop, key) = first_attributes
Free you mind and think simple: new_scene.scene_prop.my_bool = first_scene.scene_prop.my_bool

If however you need to batch-set properties from a list of strings, like the __annotations__.keys() method returns, you can use Pythons setattr and getattr methods:

for s in first_scene.scene_prop.__annotations__.keys():
    setattr(new_scene.scene_prop, s, getattr(first_scene.scene_prop, s))


So in the end, your function from above could be turned into:

def my_function(self, context):
    first_scene = bpy.context.scene

    ### new scene creation comes before the loop:
    new_scene= bpy.data.scenes.new("New scene")    
    context.window.scene = new_scene

    ### copy attributes from source to target scene:
    for key in first_scene.scene_prop.__annotations__.keys():
        source_attribute = getattr(first_scene.scene_prop, key)
        setattr(new_scene.scene_prop, key, source_attribute)