Re: a couple of things I don't understand wrt lists

2013-04-18 Thread aaB
> The second guess, more likely, is that you're using "is" to compare > numbers, and that's never a safe idea. It might happen to work for > small numbers, but you should be using ==. The second guess was right, changing "is" for "==" solved it, thanks. I still have a lot to learn about python sem

Re: a couple of things I don't understand wrt lists

2013-04-18 Thread aaB
Hello, I am still in the process of writing preliminary code for my CA project. I am now running into a behavior that I can't explain. Here is a script which, at least on my system, shows the issue (python2.7 on a linux system). The final project will be wrapping these functions (and others) into

Re: a couple of things I don't understand wrt lists

2013-04-17 Thread aaB
Hello, Thanks for all your replies, things are getting clearer. - copy/paste vs retyping: Several people have remarked that I had retyped instead of copy/pasting. This is exactly what happened, the fact is I haven't figured out yet how to enable copy/pasting from urxvt to vim. I'll try to get th

a couple of things I don't understand wrt lists

2013-04-16 Thread aaB
hello, I am a beginner programmer. I started learning programming about a year and a half ago, using C. I picked up python a few months ago, but only wrote very few scripts. I am currently trying to learn more about the python way of doing things by writing a script that generates png images usin