[Tutor] Dict operation question.
javier at ruere.com.ar
Sat Jul 9 01:33:21 CEST 2005
Kent Johnson wrote:
> My understanding of the OP is that he wants an exception if there are items in errdict. Also this solution will change self.somedict even in the error case which may not be desirable.
I understood what the OP said but think he expressed himself incorrectly or the algorithm is wrong. If the exception is thrown when errdict contains elements and somedict is not updated, then somedict will never have any new keys, making the update pointless. On the other hand, if my interpretation was correct there is no point in putting errdict in the exception since it will always be empty. Who knows...
More information about the Tutor