Re: Teaching python to non-programmers
On Thursday, April 10, 2014 3:40:22 PM UTC-7, Rhodri James wrote: It's called irony, and unfortunately Mark is reacting to an all-to-common situation that GoogleGroups foists on unsuspecting posters like yourself. People who say I can't be bothered to correct this while posting a wise a$$ correction are just trolling, probably not funny in real life either. I think if you're going to wise off than be witty about it, otherwise just a terse reference to a link. At any rate, my original point stands. You're not teaching on planet Vulcan. Better to teach things in an odd order if that helps motivates your students. It's not like people in real life carefully examine all available documentation before learning some piece of tech. Usually they shrug and say what's the worst that could happen, dive in, and roll with the consequences. -- https://mail.python.org/mailman/listinfo/python-list
Re: how to make [a,b,[c,d],e] into ['a', 'b', 'c', 'd', 'e'] ?
I've been using compiler.ast.flatten, but I have comments indicating it will need be replaced if/when I move to Python 3. I don't pollute my code base with flatten, I just call my own version in my utility library that is currently redirecting to flatten. flatten works equally well with tuples as lists and I'm going to remain consistent with that. My version returns a tuple as well. My love affair with the immutable, hashable, and wonderfully named tuple is perhaps something that needs its own thread, or private room. On Wednesday, April 9, 2014 10:14:49 PM UTC-7, length power wrote: x=[a,b,[c,d],e] y=x[2] y ['c', 'd'] x.insert(2,y[0]) x ['a', 'b', 'c', ['c', 'd'], 'e'] x.insert(3,y[1]) x ['a', 'b', 'c', 'd', ['c', 'd'], 'e'] del x[4] x ['a', 'b', 'c', 'd', 'e'] maybe there is a more smart way to do. -- https://mail.python.org/mailman/listinfo/python-list
Re: Teaching python to non-programmers
Don't underestimate the value of morale. Python is a scripting language. You don't need to teach them very much python to get something working, and you can always revisit the initial code and refactor it for better coding hygiene. Someday they might have jobs, and be required to learn things in more of a top down order. ;) On Thursday, April 10, 2014 8:54:48 AM UTC-7, Lalitha Prasad K wrote: Dear List Recently I was requested to teach python to a group of students of GIS (Geographic Information Systems). Their knowledge of programming is zero. The objective is to enable them to write plug-ins for GIS software like QGIS and ArcGIS. It would require them to learn, besides core python, PyQt, QtDesigner. So my plan is to teach them core python, PyQt, Qt Designer, in that order. A kind of bottom up approach. But the students seem to feel that I should use top down approach. That is, show them how to write a plug-in, then PyQt and Qt Designer and then enough of python so they can handle the above. I don't think, that is possible or a good idea. But I would like to know, if there are any other approaches. Thanks and Regards Lalitha Prasad, -- https://mail.python.org/mailman/listinfo/python-list
Re: Teaching python to non-programmers
Just awesome, not only do we have double line spacing and single line paragraphs, we've also got top posting, oh boy am I a happy bunny :) I'll leave someone3 else to explain, I just can't be bothered. Do you get paid to be a jerk, or is it just for yuks? If the latter, you're not funny. -- https://mail.python.org/mailman/listinfo/python-list