Simple python code does not work Not sure why this simple code does not work. I tried several things... but it only works if the values are statics . In this example I put one dinamic value (does not work) and another that works but is burned.
Code:
import bpy

#create prop_group
props = {
    &quot;name&quot; : [],
    &quot;type&quot; : [],
}

#add props 
props[&quot;name&quot;].append( &quot;fl_prop&quot; )
props[&quot;type&quot;].append( &quot;float&quot; )

print(&quot;---&quot; )
class CustomPropGr(bpy.types.PropertyGroup):
    
    global props
    
    for name in props[ &quot;name&quot;] :
        for type in props[ &quot;type&quot; ] :
            
            if type == &quot;float&quot; :
                print(&quot;debug:: name : &quot;, name, &quot; type: &quot; ,type )
                name : bpy.props.FloatProperty( name = name )
            # end if
            
        # end for
    # end for
    
    no_dinamic_prop : bpy.props.FloatProperty( name = &quot;test&quot; )
    
# end CustomPropGr
bpy.utils.register_class( CustomPropGr )


#make it enable and discovery for all objects
bpy.types.Object.custom_prop_gr = bpy.props.PointerProperty(type=CustomPropGr)


so = bpy.context.active_object

so.custom_prop_gr.no_dinamic_prop = 5.90
so.custom_prop_gr.fl_prop         = 90.5
print( &quot;no_dinamic_prop    : &quot;, so.custom_prop_gr.no_dinamic_prop )
#comment the below line to see the outputs
print( &quot;dina prop (fl_prop): &quot;, so.custom_prop_gr.fl_prop )
print(&quot;---&quot; )
name : bpy.props.FloatProperty( name = name )

is assigning bpy.props.FloatProperty( name = name ) to the variable called name ( the name before the : )
Then you try to assign a value to so.custom_prop_gr.fl_prop which does not exist, because you used the variable name to create the custom property.
Then in your print command at the end:
print( &quot;dina prop (fl_prop): &quot;, so.custom_prop_gr.fl_prop )

is also trying to call so.custom_prop_gr.fl_prop which does not exist.
Change:
so.custom_prop_gr.fl_prop         = 90.5
print( &quot;dina prop (fl_prop): &quot;, so.custom_prop_gr.fl_prop )

to:
so.custom_prop_gr.name         = 90.5
print( &quot;dina prop (fl_prop): &quot;, so.custom_prop_gr.name )