alister.ware at ntlworld.com
Sat Jun 30 11:31:53 CEST 2012
On Fri, 29 Jun 2012 14:49:11 -0600, Littlefield, Tyler wrote:
> I am no expert but from what have picked up so far from x import is
> frowned upon in most cases also this section in main strikes me as a bit
> odd and convoluted w = world() serv = server(client) w.server = serv
> serv.world = w I think you are cross referencing classes & would be
> better to investigate inheritance.
> From what I understand and how I've always employed it, inheritance is
> ment when you wish to give a class characteristics of another class. All
> I'm doing here is setting the world and server classes on each other, so
> they can call one another. This probably isn't needed in case of
> serv.server = w, but for sure the other way around.
I was not too sure of exactly why the code looked odd.
as mentioned in another post I should really have referred to the
I am new to python (about 6 months of home hacking), I looked at the code
to see if it could improve my knowledge & my responses have been intended
to spark a 2 way discussion of the pro's & cons of the approach.
So far that seems to be working, I expect by the end of this I will have
learnt much about real world python apps.
Nobody ever died from oven crude poisoning.
More information about the Python-list