Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Thank you sir. I think you may be on to something there. I've done mainframe, machine, 3GL, and 4GL languages, but the last couple I've taken on have given me headaches. I guess I'll have to just read a bunch first and then try and write something simpler than what I'm attempting to take on...

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 3:49 PM, DL Neil wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ .. The section is on classes and objects - https://www.l

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ .. The section is on classes and objects - https://www.learnpython.org/en/Classes_and_Objects

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 2:28 PM, DL Neil wrote: Jack, On 15/03/19 3:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ ..

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Jack, On 15/03/19 3:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 12:50 PM, Calvin Spealman wrote: You still need to get of the two lines at the start of your class, they are unnecessary and reference variables you never defined: class weapon:     weaponId  # Get rid of this line!     manufacturerName  # And this one, too! On Thu, Mar 14, 2019 at

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
You still need to get of the two lines at the start of your class, they are unnecessary and reference variables you never defined: class weapon: weaponId # Get rid of this line! manufacturerName # And this one, too! On Thu, Mar 14, 2019 at 12:43 PM Jack Dangler wrote: > > On 3/14/19 1

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 10:39 AM, Calvin Spealman wrote: A few notes, Jack: On Thu, Mar 14, 2019 at 10:32 AM Jack Dangler > wrote: On 3/14/19 10:11 AM, Calvin Spealman wrote: Where are you seeing something like this? The two lines under `class weapon:` are not correc

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
A few notes, Jack: On Thu, Mar 14, 2019 at 10:32 AM Jack Dangler wrote: > > On 3/14/19 10:11 AM, Calvin Spealman wrote: > > Where are you seeing something like this? The two lines under `class > weapon:` are not correct because they are variable names that you've never > defined. > > Maybe you i

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 10:11 AM, Calvin Spealman wrote: Where are you seeing something like this? The two lines under `class weapon:` are not correct because they are variable names that you've never defined. Maybe you intended this to "declare" the attributes for the class? That isn't something you nee

Re: Not Defined error in basic code

2019-03-14 Thread Jason Friedman
On Thu, Mar 14, 2019 at 8:07 AM Jack Dangler wrote: > > > class weapon: > weaponId > manufacturerName > > def printWeaponInfo(self): > infoString = "ID: %d Mfg: %s Model: %s" % (self.weaponId, > self.manufacturerName) > return infoString > > > > import class_wea

Re: Not Defined error in basic code

2019-03-14 Thread Dan Sommers
On 3/14/19 9:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - class weapon:     weaponId     manufacturerName The previous two lines attempt to refer to existing names, but neither name exists.     def printWeaponInfo(self):  

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
Where are you seeing something like this? The two lines under `class weapon:` are not correct because they are variable names that you've never defined. Maybe you intended this to "declare" the attributes for the class? That isn't something you need to do in Python. If you simply remove these line

Not Defined error in basic code

2019-03-14 Thread Jack Dangler
Just getting started with tutorials and such, and don't understand this - class weapon:     weaponId     manufacturerName     def printWeaponInfo(self):     infoString = "ID: %d Mfg: %s Model: %s" % (self.weaponId, self.manufacturerName)     return infoString import class_weapon