[Tutor] simple arg problem

Keith Winston keithwins at gmail.com
Sat Jan 4 04:23:28 CET 2014


Ah, more briefly: parens. Wow, okay then. Thanks.


On Fri, Jan 3, 2014 at 10:14 PM, eryksun <eryksun at gmail.com> wrote:

> On Fri, Jan 3, 2014 at 9:56 PM, Keith Winston <keithwins at gmail.com> wrote:
> >
> > if __name__ == "__main__":
> >     tarray = CandL_Array
> >     tarray.populate(100)
> >
> > I get an error
> >
> > Traceback (most recent call last):
> >   File "/home/keithwins/Dropbox/Python/CandL8.py", line 127, in <module>
> >     tarray.populate(100)
> > TypeError: populate() missing 1 required positional argument:
> 'gamecount1'
> >>>>
> >
> > Which seems to say it wants another argument, but I am in the habit of
> not
> > counting the self argument... I thought I understood that. I'm sure it's
> > something obvious, but I've been staring at it for hours. This is going
> to
> > be embarrassing...
>
> You've assigned the class to `tarray` instead of assigning an instance
> of the class. Forgetting to call() is a common mistake.
>



-- 
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140103/3904ac9c/attachment.html>


More information about the Tutor mailing list