Re: OO and game design questions

2010-10-20 Thread dex
On Oct 19, 8:08 pm, Carl Banks pavlovevide...@gmail.com wrote: On Oct 19, 1:19 am, dex josipmisko...@gmail.com 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 to not know where your

Re: OO and game design questions

2010-10-20 Thread dex
On Oct 19, 6:54 pm, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 19 Oct 2010 01:19:48 -0700 (PDT), dex josipmisko...@gmail.com 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 reference

Re: OO and game design questions

2010-10-20 Thread dex
On Oct 20, 12:25 pm, Jonathan Hartley tart...@tartley.com wrote: On Oct 18, 8:28 am, dex josipmisko...@gmail.com 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-engineer simple

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 door

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

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

[issue3138] Hang when calling get() on an empty queue in the queue module

2008-06-19 Thread Dex
New submission from Dex [EMAIL PROTECTED]: This behavior appears in Python 3.0b1. If you use queue.Queue and call the get method on the empty queue, it appears to hang. The same behavior seems to be evident in the PriorityQueue too. -- messages: 68393 nosy: slash2314 severity: normal

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

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 following query