Concatenating strings creates maple copies along the way, as each pair is
concatenated and a new string is return for for the next addition.
This is probably true, but come on. For performance?
This..
for light in all_lights:
light_intensity = cmds.getAttr(light + '.intensity')
..is a lot more readable than this..
for light in all_lights:
light_intensity = cmds.getAttr('{0}.intensity'.format(light))
And that makes it right.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCxFHER9TWi2QOa81uiB%3D73%3D3Ou3yMPO1woMBSUFzpj1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.