Re: OO and game design questions

2010-10-20 Thread dex
On Oct 20, 12:25 pm, Jonathan Hartley wrote: > On Oct 18, 8:28 am, dex wrote: > > > > > > > I'm building a turn based RPG game as a hobby. The design is becoming > > increasingly complicated and confusing, and I think I may have > > tendency to over-e

Re: OO and game design questions

2010-10-20 Thread dex
On Oct 19, 6:54 pm, Dennis Lee Bieber wrote: > On Tue, 19 Oct 2010 01:19:48 -0700 (PDT), dex > declaimed the following in gmane.comp.python.general: > > > > > OK, imagine a MUD, where players can "dig out" new rooms. Room A has a > > door that holds referen

Re: OO and game design questions

2010-10-20 Thread dex
On Oct 19, 8:08 pm, Carl Banks wrote: > On Oct 19, 1:19 am, dex wrote: > > > > > > > > I'm not sure if it's a good idea to let an item disappear from your > > > inventory by a weak reference disappearing.  It seems a little shaky > > > t

Re: OO and game design questions

2010-10-19 Thread dex
> I'm not sure if it's a good idea to let an item disappear from your > inventory by a weak reference disappearing.  It seems a little shaky > to not know where your objects are being referenced, but that's yout > decision. OK, imagine a MUD, where players can "dig out" new rooms. Room A has a doo

Re: OO and game design questions

2010-10-18 Thread dex
> You're aware Python can collect reference cycles, correct?  You don't > have to delete references; Python will get them eventually.   I'm not sure I understand this part? If I don't delete all strong references, the object will not be deleted. It will persist and occupy memory as long as there's

OO and game design questions

2010-10-18 Thread dex
I'm building a turn based RPG game as a hobby. The design is becoming increasingly complicated and confusing, and I think I may have tendency to over-engineer simple things. Can anybody please check my problems-solutions and point me to more elegant solution? Every item/character/room is a separat

Re: MySQLdb extracting to a list

2007-12-13 Thread dave . dex
On Dec 13, 10:40 am, John Machin <[EMAIL PROTECTED]> wrote: > On Dec 13, 9:03 pm, [EMAIL PROTECTED] wrote: > > > > > Hi all, > > > I've been searching the docs like mad and I'm a little new to python > > so apologies if this is a basic question. > > > I would like to extract the results of the foll

MySQLdb extracting to a list

2007-12-13 Thread dave . dex
Hi all, I've been searching the docs like mad and I'm a little new to python so apologies if this is a basic question. I would like to extract the results of the following query into a list - SELECT columnname FROM tablename. I use the following code. # Create a connection object and create a cu