On Apr 23, 4:28 pm, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: > On Fri, 22 Apr 2011 17:08:53 +1000, Chris Angelico <ros...@gmail.com> > declaimed the following in gmane.comp.python.general: > > > I'm not so sure that all strings should autopromote to integer (or > > "numeric" generally). However, adding a string and a number _should_ > > (IMHO) promote the number to string. > > > print "Hello, "+name+", you have "+credit+" dollars of credit with us." > > > Okay, that one is probably better done with the % operator, but it > > definitely makes logical sense to concatenate numbers and strings as > > strings, not to add them as numbers. > > But what if /I/ want > "A" + 1 > to return > "B" > > <G> > -- > Wulfraed Dennis Lee Bieber AF6VN > wlfr...@ix.netcom.com HTTP://wlfraed.home.netcom.com/
I like what you have done. Was it deliberate that your site teaches python 2.x code rather than 3.x? -- http://mail.python.org/mailman/listinfo/python-list