Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81851 > unrolled thread
| Started by | Tim Delaney <timothy.c.delaney@gmail.com> |
|---|---|
| First post | 2014-12-03 22:15 +1100 |
| Last post | 2014-12-03 22:15 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Style question: Importing modules from packages - 'from' vs 'as' Tim Delaney <timothy.c.delaney@gmail.com> - 2014-12-03 22:15 +1100
| From | Tim Delaney <timothy.c.delaney@gmail.com> |
|---|---|
| Date | 2014-12-03 22:15 +1100 |
| Subject | Re: Style question: Importing modules from packages - 'from' vs 'as' |
| Message-ID | <mailman.16526.1417605326.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On 3 December 2014 at 22:02, Chris Angelico <rosuav@gmail.com> wrote: > > import os.path as path > from os import path > Bah - deleted the list and sent directly to Chris ... time to go to bed. The advantage of the former is that if you want to use a different name, it's a smaller change. But the disadvantage of the former is that if you *don't* want to rename, it violates DRY (don't repeat yourself). The difference is so marginal that I'd leave it to personal preference, and wouldn't pull someone up for either in a code review. Tim Delaney
Back to top | Article view | comp.lang.python
csiph-web