Re: [Tutor] simple arg problem

2014-01-04 Thread Alex Kleider
On 2014-01-04 10:56, Alan Gauld wrote: On 04/01/14 17:21, Alex Kleider wrote: In the reference you site, under "Oddball Solution" mention is made of "adaptor model." Is this the same as what is described here, http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93adapter, under the name of "M

Re: [Tutor] simple arg problem

2014-01-04 Thread Alan Gauld
On 04/01/14 17:21, Alex Kleider wrote: In the reference you site, under "Oddball Solution" mention is made of "adaptor model." Is this the same as what is described here, http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93adapter, under the name of "Model-View-Adaptor?" I haven't read it

Re: [Tutor] simple arg problem

2014-01-04 Thread Alex Kleider
On 2014-01-03 20:45, Steven D'Aprano wrote: On Fri, Jan 03, 2014 at 09:56:25PM -0500, Keith Winston wrote: ... >>> Eryksun has already solved your immediate problem, but I'd like to point out that the above has a couple of code smells. Are you familiar with the concept of a code smell? Cod

Re: [Tutor] simple arg problem

2014-01-04 Thread spir
On 01/04/2014 05:45 AM, Steven D'Aprano wrote: On Fri, Jan 03, 2014 at 09:56:25PM -0500, Keith Winston wrote: gmail is driving me crazy. Anyway, every time I run it with: if __name__ == "__main__": tarray = CandL_Array tarray.populate(100) I get an error Traceback (most recent call

Re: [Tutor] simple arg problem

2014-01-03 Thread Keith Winston
Hi Steven, tarray = CandL_Array(100) Yes, that's definitely better. I'll make that change. Thanks, makes sense. I'd already posted my "finished" version, so I probably won't repost with this small change right now. Keith ___ Tutor maillist - Tutor@py

Re: [Tutor] simple arg problem

2014-01-03 Thread Steven D'Aprano
On Fri, Jan 03, 2014 at 09:56:25PM -0500, Keith Winston wrote: > gmail is driving me crazy. Anyway, every time I run it with: > > if __name__ == "__main__": > tarray = CandL_Array > tarray.populate(100) > > I get an error > > Traceback (most recent call last): > File "/home/keithwins/D

Re: [Tutor] simple arg problem

2014-01-03 Thread Keith Winston
Ah, more briefly: parens. Wow, okay then. Thanks. On Fri, Jan 3, 2014 at 10:14 PM, eryksun wrote: > On Fri, Jan 3, 2014 at 9:56 PM, Keith Winston wrote: > > > > if __name__ == "__main__": > > tarray = CandL_Array > > tarray.populate(100) > > > > I get an error > > > > Traceback (most r

Re: [Tutor] simple arg problem

2014-01-03 Thread eryksun
On Fri, Jan 3, 2014 at 9:56 PM, Keith Winston 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 > tarray.populate(100) > TypeEr

Re: [Tutor] simple arg problem

2014-01-03 Thread Keith Winston
gmail is driving me crazy. Anyway, every time I run it with: 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 tarray.populate(100) TypeError: populat

[Tutor] simple arg problem

2014-01-03 Thread Keith Winston
I'm trying to rewrite/reshuffle my Chutes & Ladders code, which I generally find more confusing than writing anew. Anyway, I've got a method that seems like it calls for one argument but... def populate(self, gamecount1): """populate candl_array with a set of games""" (method of a ne