[IPython-User] ipython3 notebook does not load attributes from class = AttributeError: but it works fine in IDLE3

Dennis Daniels dennisgdaniels@gmail....
Tue Mar 19 05:51:19 CDT 2013


The video link above will show what I mean and I'll show below as well.
Here's my simple class.
class Student:
    def __init__ (self, name):
        self.name = name #attribute after the . / a  piece of info for the
        self.attend = 0
        self.grades = []
        print ("Hi! My is {0}".format(self.name))
    def addGrade(self, grade):
    def attendDay(self):
        self.attend += 1
    def getAverage(self):
        return sum(self.grades) / len (self.grades)

when I try

I get in Ipython3 notebook
AttributeError: 'Student' object has no attribute 'attendDay'

but when I run the same code in IDLE3... I do NOT have the same issue.

What's going on?

with regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130319/f784689b/attachment.html 

More information about the IPython-User mailing list