> [Jeff]
> > Also, even though this is intended to be a quick shell script, it's
> > not a bad idea to make everything except function defs into a little
> > main() function, and call it in a script-only section.
> 
> 
> [Luis]
> 
> > The only thing I'm not clear about is how 'trashcan' can be a
> > local variable inside main() when it's required by both trash() and
> > can()
> 
> 
> What Jeff is trying to say is that it's possible to pass 'trashcan' around
> as yet another parameter to both trash() and can().  That is, we can avoid
> global variables altogether, and just work with parameter passing.
> 

Lovely, thank you. I started a project that is for learning spanish
on-line, of currently 300 lines or so, that is proceeding rapidly
thanks to these lessons learned. Thank you Python Tutors, and thank
you Python!

Cheers,

Luis
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to