ó
    €Ï8  ã                   ó2   • S r SSKJr  SSKJr  SSKJr  S rg)z*Functions for formatting debugging output.é    )Úabsolute_import)Údivision)Úunicode_literalsc                 óÐ   • [        U R                  R                  5       S S9nSR                  U R                  R
                  SR                  S U 5       5      [        U 5      S9$ )at  Generic debug output for object that lists its property keys and values.

Use as function:
x = X()
generic_repr(x)
# X(y='hi', z=1)  # ID: 140030868127696

Use as addition to class:
class X:
  def __init__(self, y='hi'):
    self.y = y
    self.z = 1

  def __repr__(self):
    return generic_repr(self)
# X(y='hi', z=1)  # ID: 140030868127696

Note: Declaring a class by running eval on this repr output will work
only if all properties are settable in the class's __init__. Nested objects
may also cause an issue.

Args:
  class_instance (object): Instance of class to print debug output for.

Returns:
  Debug output string.
c                 ó   • U S   $ )Nr   © )Úkey_value_pairs    Ú,lib/googlecloudsdk/core/util/debug_output.pyÚ<lambda>Úgeneric_repr.<locals>.<lambda>4   s	   €  °Ò!2ó    )Úkeyz&{class_name}({attributes})  # ID: {id}z, c              3   óH   #   • U  H  u  pS R                  X5      v •  M     g7f)z{}={!r}N)Úformat)Ú.0ÚkÚvs      r
   Ú	<genexpr>Úgeneric_repr.<locals>.<genexpr>7   s%   é € ð @Ú->¡T Qˆ)×
Ñ
˜1×
 Ð
 Ò->ùs   ‚ ")Ú
class_nameÚ
attributesÚid)ÚsortedÚ__dict__Úitemsr   Ú	__class__Ú__name__Újoinr   )Úclass_instanceÚsorted_attributess     r
   Úgeneric_reprr!      sq   € ô8 Ø×Ñ×#Ñ#Ó%Ù
2ñ4Ðð 
2×	8Ñ	8Ø×)Ñ)×2Ñ2Ø—‘ñ @Ù->ó@ó @ä	ˆNÓ	ð	 
9ð 
ð r   N)Ú__doc__Ú
__future__r   r   r   r!   r   r   r
   Ú<module>r$      s   ðñ 1å &Ý Ý 'ó#r   