newbie: cannot import name error

Peter Hansen peter at engcorp.com
Mon Sep 10 15:17:13 EDT 2001


David Bolen wrote:
> 
> Peter Hansen <peter at engcorp.com> writes:
> 
> > While that is quite true, I thought we were talking about
> > Python extensions, not C extensions.  Whatever...
> 
> Reasonably synonymous, since most Python extensions are written in C
> (or C++).  If you're talking about Python source, typical convention
> would be to classify that as a module or package, not an "extension".

Well *now* we're talking semantics, or at least terminology.

Perhaps I misinterpreted the original poster's use of the 
word "extension".  He said he was "brand new to Python" and 
I therefore assumed he was not attempting already to install 
an "extension" (per your usage of the term) but instead a module 
or package.  If I was wrong about that, then forgive me for 
confusing the issue.

Meanwhile, is it really the case that "extension" refers 
exclusively to code not written in Python?  If so, please
refer me to where the official definition has been made
so I can set my mind at ease.

(But even then I would argue that the term extension should
refer to a module, package, or set of code, whether written
in Python or not, which is intended to be installed in such a 
way that it becomes available to all Python programs on a 
system, in the way the standard library is.  That, at least,
seems the definition likely to fulfill the "least astonishment"
principle...)

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list