On Sat, 30 Jun 2012 09:31:53 +0000, Alister wrote: > 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 > circular references. > > 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.
perhaps now is a good time for me to look at the rest of the modules to see if i can work out exactly what these circular references do. btw where or what is pants.py? -- If the path be beautiful, let us not ask where it leads. -- Anatole France -- http://mail.python.org/mailman/listinfo/python-list