Re: Object help

2009-01-12 Thread Steve Holden
James Mills wrote: > On Mon, Jan 12, 2009 at 9:49 AM, killsto wrote: >> Thanks. That makes sense. It helps a lot. Although, you spelled color >> wrong :P. > > color > colour > > They are both correct depending on what > country you come from :) > They are also both incorrect, depending which co

Re: Object help

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 2:26 PM, killsto wrote: > I was kidding. IMO, we Americans should spell color like everyone > else. Heck, use the metric system too while we are at it. Yes well why don't you start up a rally and convince your brand new shiny government to catch up with the rest of the wor

Re: Object help

2009-01-11 Thread killsto
> > > Thanks. That makes sense. It helps a lot. Although, you spelled color > > wrong :P. > > At this time of day you are likely to find yourself communicating with > Australians. Get used to it :-) > > Cheers, > John I was kidding. IMO, we Americans should spell color like everyone else. Heck, us

Re: Object help

2009-01-11 Thread John Machin
On Jan 12, 10:49 am, killsto wrote: > On Jan 11, 2:20 pm, Steven D'Aprano > wrote: > > On Sun, 11 Jan 2009 14:06:22 -0800, killsto wrote: > > > I have a class called ball. The members are things like position, size, > > > active. So each ball is an object. > > > > How do I make the object withou

Re: Object help

2009-01-11 Thread Terry Reedy
killsto wrote: Just curious, is there another way? How would I do this in c++ which is listless IIRC. If you do not have 0) built-in expandable arrays, as in Python, one can 1) program (or find) the equivalent of Python lists; 2) use linked-lists (as long as one does not need O(1) random acce

Re: Object help

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 3:49 PM, killsto wrote: > On Jan 11, 2:20 pm, Steven D'Aprano cybersource.com.au> wrote: >> On Sun, 11 Jan 2009 14:06:22 -0800, killsto wrote: >> > I have a class called ball. The members are things like position, size, >> > active. So each ball is an object. >> >> > How d

Re: Object help

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 9:49 AM, killsto wrote: > Thanks. That makes sense. It helps a lot. Although, you spelled color > wrong :P. color colour They are both correct depending on what country you come from :) > Just curious, is there another way? How would I do this in c++ which > is listless

Re: Object help

2009-01-11 Thread killsto
On Jan 11, 2:20 pm, Steven D'Aprano wrote: > On Sun, 11 Jan 2009 14:06:22 -0800, killsto wrote: > > I have a class called ball. The members are things like position, size, > > active. So each ball is an object. > > > How do I make the object without specifically saying ball1 = ball()? > > Because

Re: Object help

2009-01-11 Thread Steven D'Aprano
On Sun, 11 Jan 2009 14:06:22 -0800, killsto wrote: > I have a class called ball. The members are things like position, size, > active. So each ball is an object. > > How do I make the object without specifically saying ball1 = ball()? > Because I don't know how many balls I want; each time it is

Re: Object help

2009-01-11 Thread Jervis Whitley
On Mon, Jan 12, 2009 at 9:06 AM, killsto wrote: > > I would think something like: > > def newball(): > x = last_named_ball + 1 >ball_x = ball(size, etc) # this initializes a new ball >return ball_x > > But then that would just name a ball ball_x, not ball_1 or ball_2. > > Is it possib

Re: Object help

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 2:06 PM, killsto wrote: > I have a class called ball. The members are things like position, > size, active. So each ball is an object. Class names should use CamelCase, so it should be `Ball`, not `ball`. > How do I make the object without specifically saying ball1 = ball