Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104223
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Random832 <random832@fastmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: A mistake which almost went me mad |
| Date | Mon, 07 Mar 2016 11:28:13 -0500 |
| Lines | 14 |
| Message-ID | <mailman.25.1457368097.10335.python-list@python.org> (permalink) |
| References | <56d81044$0$19756$426a74cc@news.free.fr> <CAGuvt92tsr8hN+XnYB=FtmAXTDuM198FY92Sjjtw=P2QaVwjUg@mail.gmail.com> <20160303054822.342fb513@bigbox.christie.dr> <CAHVvXxRqkpHiWjiiUgi5JDgbMOdceTVEGBQzLP+dDy4dBuG3LQ@mail.gmail.com> <20160303125053.79e95bde@bigbox.christie.dr> <CALwzidmxMHF-jojjMbfT8g9V+Etngyf1qnnS+siCgWunamnqUw@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de kwiNDaM7T7nXHew6hzgjQwiT5zW/TNfIqid+wTtylK9Q== |
| Return-Path | <random832@fastmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'imports': 0.09; 'received:internal': 0.09; 'subject:which': 0.09; 'worked,': 0.09; 'importing': 0.15; 'packages.': 0.15; 'cwd': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'sys.path': 0.16; 'wrote:': 0.16; 'case.': 0.18; 'absolute': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'module': 0.25; "doesn't": 0.26; 'another.': 0.29; 'finds': 0.29; 'relative': 0.30; "can't": 0.32; 'maybe': 0.33; 'clear': 0.35; 'path': 0.35; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'end': 0.39; 'why': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.61; 'mar': 0.65; 'statement,': 0.66; 'useful.': 0.72; 'besides,': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=x+nxyy7sqEQ6UBrXthbm9G8FjIQ=; b=F9EU6g PXiVtKmfArMPBzEPR4hQB/K3G+0XDAL2qFcg1tLuhk5O0QV0sGFHtCkVVbOHJ5fo //88SWPaXfmqZ9fuxb5mZ42bwKqJWSPtWm2xpfd6oKt7PCGNNmGp9ayVJUny2/Zn k9SuNhBKZ09TjiYoNzhHQd6o2GikGRi3kBFf4= |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=x+nxyy7sqEQ6UBr Xthbm9G8FjIQ=; b=q00ZFSVIliPaMKGpqUovxyY8vz4KI7hFgtm4tMZQ6qX0kNX Be5JibMTsYoIAOqFPBAf1eCYCL8TUB0QtwqJxgr2hc9mDeu4xtK2Lmz16cjYHQMX Mabg3PyDZOxhhgLQ8FZfxTu5mTcflzZH7TRA6W9h7fNs/QrmUCYsiq7WKOEM= |
| X-Sasl-Enc | iLME7NLH0QZamyk2/t7dv0FT2x/trUXykgfp8+anWqnj 1457368093 |
| X-Mailer | MessagingEngine.com Webmail Interface - ajax-df15e059 |
| In-Reply-To | <CALwzidmxMHF-jojjMbfT8g9V+Etngyf1qnnS+siCgWunamnqUw@mail.gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:104223 |
Show key headers only | View raw
On Mon, Mar 7, 2016, at 11:19, Ian Kelly wrote: > Relative imports only work inside packages. You can't use a relative > import to import one top-level module from another. > > Besides, the relative import doesn't help to disambiguate in this > case. The absolute path of the stdlib email module is "email". The > absolute path of the module in your CWD is also "email". Why should a > relative import prefer one over the other? So I would think that even > if it worked, it would still just end up importing the first one it > finds on your sys.path. Maybe what we need is a system smarter than sys.path - a clear "import from stdlib" statement, and a way to designate what directories *contain stdlib modules*, would be useful.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A mistake which almost went me mad "ast" <nomail@invalid.com> - 2016-03-03 11:21 +0100
Re: A mistake which almost went me mad Chris Angelico <rosuav@gmail.com> - 2016-03-03 21:31 +1100
Re: A mistake which almost went me mad Nick Sarbicki <nick.a.sarbicki@gmail.com> - 2016-03-03 10:43 +0000
Re: A mistake which almost went me mad Tim Golden <mail@timgolden.me.uk> - 2016-03-03 10:48 +0000
Re: A mistake which almost went me mad Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-03-04 19:19 +1300
Re: A mistake which almost went me mad Steven D'Aprano <steve@pearwood.info> - 2016-03-03 23:57 +1100
Re: A mistake which almost went me mad Tim Chase <python.list@tim.thechases.com> - 2016-03-03 05:48 -0600
Re: A mistake which almost went me mad Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-03-03 16:29 +0000
Re: A mistake which almost went me mad Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-03-03 17:53 +0000
Re: A mistake which almost went me mad Tim Chase <python.list@tim.thechases.com> - 2016-03-03 12:50 -0600
Re: A mistake which almost went me mad Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-07 09:19 -0700
Re: A mistake which almost went me mad Random832 <random832@fastmail.com> - 2016-03-07 11:28 -0500
Re: A mistake which almost went me mad Chris Angelico <rosuav@gmail.com> - 2016-03-08 03:40 +1100
Re: A mistake which almost went me mad Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-09 08:34 -0800
Re: A mistake which almost went me mad Rustom Mody <rustompmody@gmail.com> - 2016-03-09 22:13 -0800
Re: A mistake which almost went me mad Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-10 16:54 -0800
csiph-web