Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32691 > unrolled thread
| Started by | Michael Schwarz <michi.schwarz@gmail.com> |
|---|---|
| First post | 2012-11-03 10:26 +0100 |
| Last post | 2012-11-03 10:26 +0100 |
| 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: How to improve the usability of nested packages Michael Schwarz <michi.schwarz@gmail.com> - 2012-11-03 10:26 +0100
| From | Michael Schwarz <michi.schwarz@gmail.com> |
|---|---|
| Date | 2012-11-03 10:26 +0100 |
| Subject | Re: How to improve the usability of nested packages |
| Message-ID | <mailman.3238.1351934797.27098.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Hi Stefan On 2012-W44-5, at 19:23, Stefan H. Holek wrote: > That said, there are ways to avoid import cycles. One is to very carefully craft your modules so they do not have to import from each other. Another is to not have imports at the module level, but move them into the functions where they are required. I've also thought about that. I do not like the fact that I then need to educate the other developers about minute details of the import machinery just so they can add code to the library. I'm currently the only developer doing actual work in Python and would like to make the transition as painless as possible. > Third, large libraries like the Zope Toolkit usually have mechanisms to defer imports to some point after initial loading. You may want explore this direction as well. [2] Hmm, I like the idea but sadly it doesn't look very IDE-friendly. Thanks for your tips! Michael [1]: http://docs.zope.org/zopetoolkit/codingstyle/python-style.html
Back to top | Article view | comp.lang.python
csiph-web