[Tutor] Two Quick Questions

Russell rab121@york.ac.uk
Sun, 24 Jun 2001 19:10:48 +0100


Hello,

First, a general programming thingy.  Beyond the recent discussion of
version releases, is there a generally accepted way of actually giving
version numbers?  I tend to work on majorversion.minorchanges but is
there a more conventional way of handling it?  I never have figured out
the third number in some version either...

Secondly a, probably absurdly stupid, Puthon question (I'm only a
beginner ;o).  Fiddling around I discovered that using:

if not x in y:

and

if x not in y:

both give the same result for simple things.  E.g. for:

L = ['a', 'b', 'c']
S = 'g'

both:

if not S in L:
	print 'shrubbery'

and:

if S not in L:
	print 'shrubbery'

will give me a small decorative tree arrangement.

My question is:  Does the difference in order of nots and variables make
any difference when used in more complex, subtle ways?  If not, what is
the usual way of ordering it?  I prefer the second beacuse it sounds
nicer, but still ;o)

Thankyou for your help,

Russell
-- 
When you look up into the night sky and see the millions of glittering
stars, do you ever stop and wonder whether there might be another family
somewhere up there, living their peaceful pink lives on some distant
blue moon?