
class ReadOnlyDataStructure:

    def __init__ (self, **kwargs):
        self.__internal = kwargs
        self.__remove_null_keys()

    def get (self, key, default = None):
        return self.__internal.get(key, default)

    def __bool__ (self):
        return bool(self.__internal)

    def __remove_null_keys (self):
        null_keys = [k for k, v in self.__internal.items() if v is None]

        for key in null_keys:
            del self.__internal[key]


class ReadOnlyDataStructure:

    def __init__ (self, **kwargs):
        self.__internal = kwargs
        self.__remove_null_keys()

    def get (self, key, default = None):
        return self.__internal.get(key, default)

    def __bool__ (self):
        return bool(self.__internal)

    def __repr__ (self):
        dictstr = [self.__class__.__name__]
        for key, value in self.__internal.items():
            dictstr.append("{}={}".format(key, repr(value)))

        return "<{}>".format(" ".join(dictstr))

    def __remove_null_keys (self):
        null_keys = [k for k, v in self.__internal.items() if v is None]

        for key in null_keys:
            del self.__internal[key]

Add repr to data structures
Add repr to data structures

  
  class ReadOnlyDataStructure:
  
      def __init__ (self, **kwargs):
          self.__internal = kwargs
          self.__remove_null_keys()
  
      def get (self, key, default = None):
          return self.__internal.get(key, default)
  
      def __bool__ (self):
          return bool(self.__internal)
  
+     def __repr__ (self):
+         dictstr = [self.__class__.__name__]
+         for key, value in self.__internal.items():
+             dictstr.append("{}={}".format(key, repr(value)))
+ 
+         return "<{}>".format(" ".join(dictstr))
+ 
      def __remove_null_keys (self):
          null_keys = [k for k, v in self.__internal.items() if v is None]
  
          for key in null_keys:
              del self.__internal[key]
  
Add repr to data structures
## Code Before:

class ReadOnlyDataStructure:

    def __init__ (self, **kwargs):
        self.__internal = kwargs
        self.__remove_null_keys()

    def get (self, key, default = None):
        return self.__internal.get(key, default)

    def __bool__ (self):
        return bool(self.__internal)

    def __remove_null_keys (self):
        null_keys = [k for k, v in self.__internal.items() if v is None]

        for key in null_keys:
            del self.__internal[key]

## Instruction:
Add repr to data structures
## Code After:

class ReadOnlyDataStructure:

    def __init__ (self, **kwargs):
        self.__internal = kwargs
        self.__remove_null_keys()

    def get (self, key, default = None):
        return self.__internal.get(key, default)

    def __bool__ (self):
        return bool(self.__internal)

    def __repr__ (self):
        dictstr = [self.__class__.__name__]
        for key, value in self.__internal.items():
            dictstr.append("{}={}".format(key, repr(value)))

        return "<{}>".format(" ".join(dictstr))

    def __remove_null_keys (self):
        null_keys = [k for k, v in self.__internal.items() if v is None]

        for key in null_keys:
            del self.__internal[key]
