On Tue, Jan 4, 2011 at 2:06 AM, Alan Gauld <alan.ga...@btinternet.com> wrote: > > "Tim Johnson" <t...@johnsons-web.com> wrote > >> Now, Alan, do you know anything about PHP? If you do, can you >> comment on the PHP extract() function? > > I know enough basic PHP to read a page with code in it and get the general > drift. I've never written a line of it and have learned enough about it that > I don't want to! :-) > > Now as for extract() - it doesn't appear in my Teach Yourself PHP book, so > nope, I've no idea what it does, I'd need to look it up. > And I'm way too lazy, and it's way too late to do that! :-) >
extract takes an array and merges it with the local symbol table. Essentially the same thing locals() would do if it was actually writable everywhere (as Steven points out it isn't). If you ask me, this is an insanely bad idea and I have not a clue as to why you'd actually want to do this, rather than just work with the array. Hugo _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor