hey, 

i understand using .format i can substitute in a value into the middle of string

eg.

word = 'cat'
print 'the {} sat on the mat'.format(word)

but what if you want to substitute in a string into a line which has other 
operations at the end. Like this example

cmds.getAttr(curves['curve{}'].spans*2+1

here i am accessing a curve from a dictionary and finding its span value and 
then multiplying by 2 + 1.

So where in this line can i put the .format(value) ?. I cant put it right at 
the end or put it right after the string in between the string and the ].

can someone help me understand how i can do this. Using the concatenation + 
doesnt work either because is just returns: 

unsupported operand type(s) for +: 'NoneType' and 'str'

any help on this would be nice, 
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/9d99b0ee-88f3-4a44-9263-0bf8012c1a4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to