Are we sure that name does not have to be escaped? I guess it should be valid Python identifier and thus be safe, but maybe it's worth leaving a comment here?