Message237400
| Author |
davin |
| Recipients |
berker.peksag, brett.cannon, davin, eric.snow, erik.bray, jnoller, ncoghlan, olebole, sbt, serhiy.storchaka |
| Date |
2015-03-06.23:36:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1425685013.58.0.290165880479.issue23400@psf.upfronthosting.co.za> |
| In-reply-to |
|
| Content |
> No, I suggested to replace only the line that produces AttributeError now.
Ah! Sorry, I misunderstood and incorrectly assumed you were imagining the import to happen at the top of the module.
I must confess I am hesitant about the idea of putting an import inside the Queue.__init__ (or any method) because I generally don't consider it a best practice -- that said, there are a number of places within (not only) the multiprocessing module where imports are performed dynamically as part of implementations for various methods, but it bothers me when I see those as well. Yet your solution is simple and offers the benefit of not having the same (or nearly the same) text appear twice in the code.
Berker: Do you have any strong feeling on this idea? If not, I am tempted to bend on my instinctive reaction here and go with Serhiy's style. |
|