Select all Mesh Type Object and Modify its Parameters

Hi,

I wanted to (1) select all mesh type object and (2) Modify the smoothing parameter.
Here is the script I have so far:

import bpy

objects = bpy.context.scene.objects

for obj in objects:
    obj.select = obj.type == "MESH"

for ob in bpy.context.selected_objects:
    ob.use_auto_smooth = True
    ob.auto_smooth_angle = 0.523599   

It returns an error of object has no attribute of auto smooth. But that attribute has copy pasted from the console.

Is there a way around this?

Thank you for looking at the problem

Oh scratch this. It should be ob.data.use_auto_smooth