setAttr on all members of non numeric compound attribute at once?


I can setAttr on each member individually, but I was curious if it’s possible to setAttr on all members of a compound string at once? I’m assuming we would need to pass an array of types which I don’t think is possible…

string $g = `group -em -n "band"`;
addAttr -ln "beatles" -at "compound" -nc 4 $g;
addAttr -ln "member1" -dt "string" -p "beatles" $g;
addAttr -ln "member2" -dt "string" -p "beatles" $g;
addAttr -ln "member3" -dt "string" -p "beatles" $g;
addAttr -ln "member4" -dt "string" -p "beatles" $g;

//these break
setAttr ($g + ".beatles") "john" "paul" "ringo" "george";
setAttr ($g + ".beatles") -type ("string", "string", "string", "string") "john" "paul" "ringo" "george";