Need some advice

Bruno Desthuilliers bdesth.nospam at removeme.free.fr
Sat Nov 29 20:32:05 EST 2003


Jeff Wagner wrote:
> I am in the process of learning Python (obsessively so). I've been through a few tutorials and read
> a Python book that was lent to me. I am now trying to put what I've learned to use by rewriting that
> Numerology program I wrote years ago in VB.
> 
> There are times I am totally stuck (for instance, I just had an idea to put the numerical values of
> the alphabet and months of the year in a dictionary located in a function. Then, I can import the
> dictionary I need from that function ... well, I'm getting import errors).

"import the dictionnary from a function" ????

> So the question is this ... when I get stuck like this and seem to be banging into walls with
> everything I try, is it better to continue trying different things

Definitively, *no*, niet, nein, non, etc... If you don't know what 
you're doing, it's not programming, it's a story about monkeys, 
typewriters and Shakespeare.

> or stop, take a break and go back
> to reading a tutorial or a Python book? 

Should be one of the first thing to do. You won't do anything good if 
you don't know enough of the language.

> Or is it better that after I've tried everything I can think
> of, 

"trying everything [you] can think of" is not programming. See above...

> I just post the question here, get the answer and move forward?

First try to know what you're trying to do, and why you're trying to do 
it this way. Ask yourself if this is the best way (or at least the most 
obvious way) to do it with the language. Then look thru your tutorials, 
books, etc to see how this can be done. Don't forget that the Python 
shell is a great tool.

If then you're still stuck, you're of course welcome to post your 
question here, with explanation about what you're trying to do and what 
you're stuck with !-)

My 0.2 cents
Bruno





More information about the Python-list mailing list