newbie class troubles

Erik Max Francis max at alcyone.com
Sun Sep 17 15:49:29 EDT 2000


Brett Lempereur wrote:

> If i did have more words to tell you, i would!
> 
> It's really annoying, because at least when i'm programming in C++ or
> Vb it
> throws up a pile of errors at you with pointers to the solutions, but
> not in
> python, oh no. The only error i got in python was "TypeError: unbound
> method must be called with class instance 1st argument"  seeing as it
> doesn't actually happen when the "search.py" module gets compiled, it
> must
> be something to do with the references.

Python is giving you a precise error and telling you where it happened. 
The problem here is that you're telling us the error, but _not where it
occurs_.  It's hard to tell what's wrong with your code when we don't
even know where the error was generated; for all we know it was
generated in driver code that you did not show us.  You have not given
us enough information to confidently and clearly point out where the
problem is.  Not to mention the fact that you are replying to objections
and questions without quoting the previous article, making it difficult
to follow the thread.

In any programming language newsgroup, the proper way to get help is to
1. reproduce the error, 2. trim down the relevant code (including the
code which runs it!) to the smallest amount which reproduces the bug,
and 3. post that (brief) code along with the exact error that occurs and
which line it occurs on (pointing that line out in your code, so we
don't have to count).  Without this information it is often impossible
to tell where the error occurs.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Lawyers, I suppose, were children once.
\__/ Charles Lamb
    Erik Max Francis' bookmarks / http://www.alcyone.com/max/links/
 A highly categorized list of Web links.



More information about the Python-list mailing list