Dict Comprehension With Class Objects
<p>I'm trying to create a dictionary of employee names as keys with values of objects of class FullTime. The one line of code I thought I would need for this was: </p>

<pre><code>staffClassDict = {employee: FullTime(employee) for employee in staffList}
</code></pre>

<p>However, the dictionary is not created when I use this code, leading to a lot of key errors throughout the program. If I replace the <code>FullTime(employee)</code> with 0, the list is made without a hitch. Is there any way to achieve dict comprehension using objects, or should I just stick to a more traditional for loop? </p>
