This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2015-03-06 23:36:53davinsetrecipients: + davin, brett.cannon, ncoghlan, jnoller, erik.bray, sbt, eric.snow, berker.peksag, serhiy.storchaka, olebole
2015-03-06 23:36:53davinsetmessageid: <1425685013.58.0.290165880479.issue23400@psf.upfronthosting.co.za>
2015-03-06 23:36:53davinlinkissue23400 messages
2015-03-06 23:36:53davincreate