Author vinay.sajip
Recipients chris.jerdonek, flox, vinay.sajip
Date 2010-03-22.18:45:43
SpamBayes Score 5.37487e-06
Marked as misclassified No
Message-id <>
In-reply-to <>
----- Original Message ----

Reversing the if-else in Florent's suggestion seems to 
> address points (1) and (2).  Is there a reason to set and check an mp 
> variable rather than simply having the try-except block?

Just that it went over the 80-column limit :-)

Also, I know about asking forgiveness rather than permission, but Florent's change doesn't make clear the intent to call current_process only if multiprocessing has already been imported (i.e. is in sys.modules). In other words, he would catch both the KeyError and any error due to an incomplete import of multiprocessing. While either version will work, the way I have it preserves the original intent and only traps errors due to multiprocessing being incompletely imported.
Date User Action Args
2010-03-22 18:45:45vinay.sajipsetrecipients: + vinay.sajip, flox, chris.jerdonek
2010-03-22 18:45:43vinay.sajiplinkissue8200 messages
2010-03-22 18:45:43vinay.sajipcreate