class_docstr: List populated on first use.
class_docstr_tok: ["List","populated","on","first","use","."]
code: def __new__(cls, fill_iter=None):
      if fill_iter is None:
          return list()
  
      # We need a new class as we will be dynamically messing with its
      # methods.
      class LazyList(list):
          pass
  
      fill_iter = [fill_iter]
  
      def lazy(name):
          def _lazy(self, *args, **kw):
              _fill_lock.acquire()
              try:
                  if len(fill_iter) > 0:
                      list.extend(self, fill_iter.pop())
                      for method_name in cls._props:
                          delattr(LazyList, method_name)
              finally:
                  _fill_lock.release()
              return getattr(list, name)(self, *args, **kw)
  
          return _lazy
  
      for name in cls._props:
          setattr(LazyList, name, lazy(name))
  
      new_list = LazyList()
      return new_list
  
file_path: catboost/contrib/python/pytz/py2/pytz/lazy.py
imports: from threading import RLock
label_desc: Use image node_id 1 for calling the LazyList obj's underlying member method code with example usage: obj.__new__(cls, fill_iter) and returns: new_list, list, _lazy, getattr