Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41958
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rocky.bernstein@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.018 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'ambiguity': 0.09; 'pep': 0.09; "they've": 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '328': 0.16; 'collections': 0.16; 'exist.': 0.16; 'from:addr:gnu.org': 0.16; 'subject:import': 0.16; 'sys.path': 0.16; 'language': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'do.': 0.18; 'pfxlen:0': 0.19; 'import': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'header:In- Reply-To:1': 0.27; 'url:code': 0.29; 'relative': 0.30; 'message- id:@mail.gmail.com': 0.30; 'asked': 0.31; '-0700,': 0.31; 'probably': 0.32; 'worked': 0.33; 'something': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'impression': 0.36; "didn't": 0.36; 'should': 0.36; 'error.': 0.37; 'searching': 0.37; 'wrong': 0.37; 'pm,': 0.38; 'mentioned': 0.61; 'places': 0.64; 'url:p': 0.64; 'to:addr:gmail.com': 0.65; 'details': 0.65; 'mar': 0.68; '26,': 0.68; 'wish': 0.70; 'phil': 0.84; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=oIvPkKgDr/QBj3h4GWl1xgGwBxuaw9MPvQkGmQkHAxI=; b=EgpdDd6mC7Xyw7umZwcdC3Mg0QdNNU56fJtlXtEdqTrFI4n6Ze9Z6LTe+HrGJvvVqs 3RCAsw4i5+nX62Lwnn3yrLSzQTcWI0en2zTN5KY/As0WVNq/T9gnyUi1wwBRHMTDqyS+ rG/TOJlBd2s/SvaONTie0JGs4XPggcyAEUAgvlMzjgBoqJbduP7IpwtYwfr2SP/tLwai cLYOR/2yjl6mYCPfxTuIMe9HxdXl9WTzlej52ZZdahtIBinf2qhA2bzzsGRlEk/kaDrs Kir6fE6Gaovbhtpi6JMGYNZIDToZsJqEE7KCg/70TFpy6gQplwwhgJ3T4q38l4ZoG0mC RWDg== |
| MIME-Version | 1.0 |
| X-Received | by 10.180.185.239 with SMTP id ff15mr6084627wic.2.1364336642572; Tue, 26 Mar 2013 15:24:02 -0700 (PDT) |
| Sender | rocky.bernstein@gmail.com |
| In-Reply-To | <20130326211657.GA1615@odell.Belkin> |
| References | <kio19e$5e2$1@ger.gmane.org> <mailman.3722.1364281502.2939.python-list@python.org> <2b893e00-8fac-4733-b07d-2041af850540@googlegroups.com> <20130326211657.GA1615@odell.Belkin> |
| Date | Tue, 26 Mar 2013 18:24:02 -0400 |
| X-Google-Sender-Auth | eBABgjcCFst6c3SAE8dD2mA1puo |
| Subject | Re: import in Python3.3 |
| From | Rocky Bernstein <rocky@gnu.org> |
| To | Phil Connell <pconnell@gmail.com> |
| Content-Type | multipart/alternative; boundary=001a11c34dc2ef487e04d8db6028 |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3781.1364336644.2939.python-list@python.org> (permalink) |
| Lines | 84 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1364336644 news.xs4all.nl 6882 [2001:888:2000:d::a6]:46179 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:41958 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Tue, Mar 26, 2013 at 5:16 PM, Phil Connell <pconnell@gmail.com> wrote: > On Tue, Mar 26, 2013 at 08:37:00AM -0700, rocky wrote: > > And again, I get the impression that for the use case asked about, there > isn't much ambiguity. If I am in mypackage.foo and I want to access > mypackage.collections I should be able to say something like that without > ambiguity or that much inference or directory searching. If > mypackage.colletions is not found inside the same directory as > mypackage.foo, often I DON'T WANT Python to helpfully go searching around > other places for it which sys.path will do. Instead what I probably want is > Python to give me an error. > > > > So again I come to import_relative, > http://code.google.com/p/pyimport-relative/. And again, I wish this > package didn't have to exist. > > What's wrong with PEP 328 relative imports? > They've never worked for me. Some details are mentioned that in the link above. If it works for you, great, use it. > In mypackage.foo, use > > from . import collections > > to import mypackage.collections. > > > This has been part of the language since ~2.5 > >
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: import in Python3.3 Terry Reedy <tjreedy@udel.edu> - 2013-03-26 03:04 -0400
Re: import in Python3.3 rocky <rocky@gnu.org> - 2013-03-26 08:37 -0700
Re: import in Python3.3 Phil Connell <pconnell@gmail.com> - 2013-03-26 21:16 +0000
Re: import in Python3.3 Rocky Bernstein <rocky@gnu.org> - 2013-03-26 18:24 -0400
Re: import in Python3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-26 23:06 +0000
Re: import in Python3.3 rocky <rocky@gnu.org> - 2013-03-26 17:33 -0700
Re: import in Python3.3 rocky <rocky@gnu.org> - 2013-03-26 08:37 -0700
csiph-web