def binding_for(obj, name, parent=None):
 if isinstance(obj, QObject):
  meta = obj.metaObject()
  index = meta.indexOfProperty(name)
  if (index == (-1)):
   boundprop = DynamicPropertyBinding(obj, name, parent)
  else:
   boundprop = PropertyBinding(obj, name, parent)
 else:
  raise TypeError
 return boundprop

def binding_for ( obj , name , parent = None ) : if isinstance ( obj , QObject ) : meta = obj . metaObject ( ) index = meta . indexOfProperty ( name ) if ( index == ( - 1 ) ) : boundprop = DynamicPropertyBinding ( obj , name , parent ) else : boundprop = PropertyBinding ( obj , name , parent ) else : raise TypeError return boundprop
return a suitable binding for property name of an obj .