Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91684
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Where is 'palindrome' defined? |
| Date | 2015-06-01 15:17 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <mkht2s$hvk$2@dont-email.me> (permalink) |
| References | <83a279a3-133d-4a50-9af3-054233bcc6af@googlegroups.com> |
On Sun, 31 May 2015 21:46:31 -0700, fl wrote: >>>> def palindrome(num): Note carefully the spelling(1): palindrome >>>> parlindrome(a) Note carefully the spelling(2): parlindrome > NameError: name 'parlindrome' is not defined Compare carefully spelling(1) and spelling(2). palindrome is defined, pa_r_lindrome is not defined. The computer is not psychic yet, so it doesn't know that when you wrote pa_r_lindrome you meant palindrome, you have to spell it the same way every time for the computer to recognise that you mean the same name. Now you also know that the error message: "NameError: name '<something>' is not defined" means that you might have spelled <something> differently on the line in the error message to the word you meant, so next time you see this error message you know to carefully check the spellings of function names and variables. -- Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Where is 'palindrome' defined? fl <rxjwg98@gmail.com> - 2015-05-31 21:46 -0700
Re: Where is 'palindrome' defined? Gary Herron <gherron@digipen.edu> - 2015-05-31 23:55 -0700
Re: Where is 'palindrome' defined? Grant Edwards <invalid@invalid.invalid> - 2015-06-01 15:02 +0000
Re: Where is 'palindrome' defined? Larry Hudson <orgnut@yahoo.com> - 2015-05-31 23:56 -0700
Re: Where is 'palindrome' defined? David Palao <dpalao.python@gmail.com> - 2015-06-01 08:58 +0200
Re: Where is 'palindrome' defined? Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 12:21 +0300
Re: Where is 'palindrome' defined? David Palao <dpalao.python@gmail.com> - 2015-06-01 11:41 +0200
Re: Where is 'palindrome' defined? John Ladasky <john_ladasky@sbcglobal.net> - 2015-06-02 14:14 -0700
Re: Where is 'palindrome' defined? Marko Rauhamaa <marko@pacujo.net> - 2015-06-03 01:30 +0300
Re: Where is 'palindrome' defined? Omar Abou Mrad <omar.aboumrad@gmail.com> - 2015-06-01 10:00 +0300
Re: Where is 'palindrome' defined? Denis McMahon <denismfmcmahon@gmail.com> - 2015-06-01 15:17 +0000
Re: Where is 'palindrome' defined? fl <rxjwg98@gmail.com> - 2015-06-01 17:55 -0700
Re: Where is 'palindrome' defined? sohcahtoa82@gmail.com - 2015-06-01 18:07 -0700
Re: Where is 'palindrome' defined? MRAB <python@mrabarnett.plus.com> - 2015-06-02 02:10 +0100
csiph-web