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 12result_1=getattr(C,"x")# "x" should be a str, since no dynamic access is done 13result_2=getattr(D,"x") 14 15# vim: tabstop=4 expandtab shiftwidth=4