mojo/public/tools/mojom/mojom/generate/module.py
def GenericRepr(obj, names):
  """Compute generic Repr for |obj| based on the attributes in |names|.

  Args:
    obj: The object to compute a Repr for.
    names: A dict from attribute names to include, to booleans
        specifying whether those attributes should be shown as
        references or not.

  Returns:
    A str representation of |obj|.
  """

  def ReprIndent(name, as_ref):
    return '    %s=%s' % (name, Repr(getattr(obj, name), as_ref).replace(
        '\n', '\n    '))

  return '%s(\n%s\n)' % (obj.__class__.__name__, ',\n'.join(
      ReprIndent(name, as_ref) for (name, as_ref) in names.items()))
Compute generic Repr for |obj| based on the attributes in |names|.

  Args:
    obj: The object to compute a Repr for.
    names: A dict from attribute names to include, to booleans
        specifying whether those attributes should be shown as
        references or not.

  Returns:
    A str representation of |obj|.
  
Compute generic Repr for |obj| based on the attributes in |names|.
Compute generic Repr for |obj| based on the attributes in |names| .
def GenericRepr(obj, names):
  def ReprIndent(name, as_ref):
    return '    %s=%s' % (name, Repr(getattr(obj, name), as_ref).replace(
        '\n', '\n    '))
  return '%s(\n%s\n)' % (obj.__class__.__name__, ',\n'.join(
      ReprIndent(name, as_ref) for (name, as_ref) in names.items()))
def GenericRepr ( obj , names ) : def ReprIndent ( name , as_ref ) : return '    %s=%s' % ( name , Repr ( getattr ( obj , name ) , as_ref ) . replace ( '\n' , '\n    ' ) ) return '%s(\n%s\n)' % ( obj . __class__ . __name__ , ',\n' . join ( ReprIndent ( name , as_ref ) for ( name , as_ref ) in names . items ( ) ) )
Compute generic Repr for |obj| based on the attributes in |names|.
Compute generic Repr for |obj| based on the attributes in |names| .
"""Compute generic Repr for |obj| based on the attributes in |names|.

  Args:
    obj: The object to compute a Repr for.
    names: A dict from attribute names to include, to booleans
        specifying whether those attributes should be shown as
        references or not.

  Returns:
    A str representation of |obj|.
  """
A str representation of |obj|.
A str representation of |obj| .
obj
The object to compute a Repr for.
The object to compute a Repr for .
names
A dict from attribute names to include, to booleans
specifying whether those attributes should be shown as
references or not.
A dict from attribute names to include to booleans specifying whether those attributes should be shown as references or not .