Re: Some basic newbie questions...

2006-12-28 Thread jonathan.beckett
> Too many misconceptions here (I changed to a more PEP-8 style naming): > >class Gun(object): >def __init__(self): >self.shells = 10 > >class Battleship(object): >def __init__(self): >self.guns = [Gun(), Gun()] > >def getShellsLeft(self): >

Re: Some basic newbie questions...

2006-12-28 Thread jonathan.beckett
> > I normally work with PHP, C#, Javascript, and the odd bit of C++, > > Do any of them call functions w/o parens? That's a really good point :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Some basic newbie questions...

2006-12-28 Thread jonathan.beckett
Hi Grant, thanks for the code snippets - made total sense. On the evidence of the last couple of hours, Python is still feeling very alien, but I'm starting to get my head around it. I'm just finding it a bit weird that some of the built in functions are static, rather than methods of objects (su

Re: Some basic newbie questions...

2006-12-28 Thread jonathan.beckett
Chris Mellon wrote: > On 28 Dec 2006 08:40:02 -0800, jonathan.beckett > <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > While working on support at work, I have been picking away at Python - > > because I think it could be a valuable scripting tool for buil

Some basic newbie questions...

2006-12-28 Thread jonathan.beckett
Hi all, While working on support at work, I have been picking away at Python - because I think it could be a valuable scripting tool for building utilities from. I have been reading the python.org tutorials, and playing around with some basic code, but I have ended up with a few questions that pro