Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'attribute': 0.07; 'subject:missing': 0.07; 'lookup': 0.09; 'try:': 0.09; 'will,': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'reasonably': 0.16; 'say.': 0.16; 'wrote:': 0.18; 'feb': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'correct': 0.29; 'on,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'bad.': 0.31; 'fri,': 0.33; 'actual': 0.34; 'maybe': 0.34; "can't": 0.35; 'except': 0.35; 'something': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'skip:\xd0 10': 0.36; 'handle': 0.38; 'pm,': 0.38; "couldn't": 0.39; 'sure': 0.39; 'future': 0.60; 'more': 0.64; '2015': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=8ymk6rIZwP5gtC8JgSd7MFQ62fS2sn7ZiJSn9c4ZyeA=; b=H/wp++KMcavSWuZN5KwHrqoLh9aTedfSJWuQNAVQu6dO6iBNpHSZccA6VhZ9XDMcnJ ZKyqfw6M3o5BM/ss4ScQ3ZADOVGYkPpv7sk8fkWhaIn6Q8z7dJmfCpW6AOs8uwSgvKnr OL/m8YUNh0E1FDO++stcpiDky4DoqSsnnhqHXXWpKExqxg3/mAw55GZI4vXopXcQIQmq XsRUDFT+j3n9FBjPLvIv6yYb9m5vFLYVsJomcfRolPFl+ymPNu6ssZqoJExIzBbUe3Ij 7vGgIfeRLz7AdHW0kZzg6d8CMhSSVVpIl8VQkmGOkYPpqPNTX8HipzVHtDonDWXpVxOr CWyg== MIME-Version: 1.0 X-Received: by 10.42.95.12 with SMTP id d12mr11577759icn.12.1423211648056; Fri, 06 Feb 2015 00:34:08 -0800 (PST) In-Reply-To: References: <877fvwaz1y.fsf@news.ole.ath.cx> Date: Fri, 6 Feb 2015 19:34:08 +1100 Subject: Re: multiprocessing.Queue() and missing sem_open From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1423211656 news.xs4all.nl 2830 [2001:888:2000:d::a6]:43461 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:85283 On Fri, Feb 6, 2015 at 7:27 PM, =D0=9El=D0=B5 =D0=85tr=D0=B5=D1=96=D1=81h= =D0=B5r wrote: >> the AttributeError will come from the attribute lookup - the above code >> can't[1] bomb out with ImportError. > > Maybe it can't but it actually does. Huh. Okay, my bad. (I don't have a Hurd system to test on, all my Debians are Linux.) Sorry for the misinformation. >> So a more correct way would be something like: >> >> try: >> import multiprocessing >> multiprocessing.Queue >> except (ImportError, AttributeError): >> # handle the absence > > Is it sure that this will work in the future as well? Frankly, I don't know now. It's reasonably likely that it will, but in the absence of actual documentation, I couldn't say. ChrisA