 <p><code>getFileInfoClass</code> returns a class, so <code>getFileInfoClass(f)</code> is a class. When you take a class name and write parentheses after it, you call a constructor. </p> <p>So, <code>[getFileInfoClass(f)(f) for f in fileList]</code> makes a list of <code>FileInfo</code> objects.</p>