Hi just a quick one.
Why is it necessary to use .format():
for light in all_lights:
light_intensity = cmds.getAttr('{0}.intensity'.format(light))
rather than:
for light in all_lights:
light_intensity = cmds.getAttr(light + '.intensity')
they both work but i always see people using the .format() method, rather than
just concatenating the strings. Is there a reason to use one rather than the
other. The latter seems simpler also
thanks,
Sam
--
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/d32cb68b-135f-443a-923a-83d7ae1f3034%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.