Restricted attribute assignments observed through usage analysis to instance attributes only.
1#!/usr/bin/env python 2 3classC: 4x=1 5 6classD: 7x=2 8 9defgetattr(obj,name): 10returnobj.x 11 12c=C() 13d=D() 14result_1=getattr(c,"x")# "x" should be a str, since no dynamic access is done 15result_2=getattr(d,"x") 16 17# vim: tabstop=4 expandtab shiftwidth=4