import in Python3.3

Jerry Hill malaclypse2 at gmail.com
Tue Mar 26 12:33:54 EDT 2013


On Mon, Mar 25, 2013 at 11:49 PM, rocky <rocky at gnu.org> wrote:
>> On Sun, 24 Mar 2013 18:12:49 -0500, Fabian von Romberg wrote:
>> > I have a package name collections and inside of my package I want to

> I find this kind of thing sad: it feels to me that programmers are working around somewhat arbitrary and changing restrictions. Rather than avoid names like "collections", why not try to address the underlying problem? There isn't an ambiguity here in my view: the fullname is mypackage.collections

You've said a couple of times now that the original author has a
package named "mypackage" with a module "collections" in it.  As far
as I can tell, that's untrue.  The original post claims to have a
package named "collections", which is colliding with the builtin
module of the same name.

As far as I can tell, all of your suggestions about using your
pyimport-relative tool aren't helpful unless the author re-names his
package from "collections" to "mypackage" and then moves all of their
code into a "collections" module inside "mypackage", right?

-- 
Jerry



More information about the Python-list mailing list