Pickle Problem

Mike Kent mrmakent at cox.net
Thu Mar 15 11:21:21 EDT 2007


On Mar 15, 11:13 am, "tonyr1988" <tonyr1... at gmail.com> wrote:

> if __name__=='__main__':
>         x = DemoClass
>         x.WriteToFile
>

You meant to create a DemoClass instance object, but instead, you
obtained a reference to the class object.  You want 'x = DemoClass()'
instead.
You meant to call the WriteToFile method, but instead, you obtained a
reference to the method object.  You want 'x.WriteToFile()' instead.




More information about the Python-list mailing list