On Tue June 30 2009 3:20 pm, you wrote: > On Tue, Jun 30, 2009 at 1:06 PM, Bob Rea <b...@telaugos.com> wrote: > > <snip> > > If I input my own name and dob, it works: > > b...@gandalf:~/python/MakingUse/Chapter05> python > > code1.py Enter your first name: Bob > > Enter your last name: Rea > > Enter your date of birth, mm-dd-yyyy: 03-05-1943 > > You can chose one of the following login names: > > 1. BobR > > 2. BobR53 > > 3. RBob43 > > 4. BRea66 > > > > If I use the data listed in the book, it fails: > > b...@gandalf:~/python/MakingUse/Chapter05> python > > code1.py Enter your first name: Laura > > Enter your last name: Jones > > Enter your date of birth, mm-dd-yyyy: 12-24-1980 > > You can chose one of the following login names: > > 1. LauraJ > > 2. LauraJ2412 > > 3. JLaura80 > > Traceback (most recent call last): > > File "code1.py", line 67, in ? > > fourth=fname[0]+lname+ age_func() > > TypeError: cannot concatenate 'str' and 'NoneType' > > objects > > > > What is going on here? > > Well the first line after "Traceback" give you the line > of code and the filename. Which happens to be code1.py > line 67. > > TypeError is the type of error - specifically you tried > to do something with incompatible types. In this case, > adding together a string and NoneType. > > I'll do a little digging, but my guess is you have a > problem with your age_func() not returning any value. > > HTH, > Wayne
Why doe sit work with a dob in 1943 and not with one in 1980 then, that's what really bugs me -- Bob Rea mailto:gapet...@stsams.org http://www.petard.us http://www.petard.us/blog http://www.petard.us/gallery Where is Bill Stringfellow now that we really need him? _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor