[EMAIL PROTECTED] wrote: > Just: >> [previous post, hand inserted] >>> def scramble_text(text): >>> def scramble_word(word): >> >> Btw. I find the use of a nested function here completely bogus: you >> don't need the surrounding scope. > > I don't agree, nested functions are useful to better structure your > program: to really nest things that are logically nested, to have just > one thing when you have only one thing to do, and they help you to > avoid polluting the namespace (those were the main purposes of nested > functions in Pascal-like languages).
I have never used nested functions before, but I like the idea. For the code posted earlier I stated the reason I don't like it in another post to this thread. -- If you're posting through Google read <http://cfaj.freeshell.org/google> -- http://mail.python.org/mailman/listinfo/python-list