| dancor | or otherwise wrap a module to achieve that or do i have to modify the module itself to all be in a class or something |
| Vornicus | dancor: if two modules import a single module, that module might get loaded once for each time it gets imported, but I don't know, and I'm not sure how I'd test it. |
| dancor | perhaps this kind of thing is the reason java is so class-ist i just want to use ply.lex in a threaded app |
| ivazquez | If a module is already in the module list then the existing ref is returned. |
| dancor | but the module itself maintains state |
| MugginsM | yeah non threadsafe modules are a pain seem quite common in python too, which is weird |
| dancor | MugginsM: i think i have to modify the module right? i don't see any other way |
| MugginsM | because it's perfectly capable of doing it right |
| plasmab | if anyone involved with python wants to contact me about that project, to advertise python with it let me know... we're going to be doing more projects like that all over the world yay fixed the problem my stupidity my file offset was accidentally being cast to a float during a calculation |
| ivazquez | Whoops. |
| plasmab | yeah whoops it wasnt a critical part of the system it was the script that parses the history log for the light colours at a particular time |
| cowbud | what is the general rule of thumb when using dictionaries? if I am nesting three should I be looking for a different approach? |
| ivazquez | Not necessarily. |
| Jafet | Depends on what your current approach is. Right now your problem is unpossimateable to us. |
| ivazquez | Wha? |
| Jafet | Unpossible to guesstimate! |
| plasmab | cowbud, depends on what you're storing... |
| cowbud | well I am basically making dictionaries that translate to something like this job->host->status where each is a dictionary.. |
| MugginsM | sounds ok to me |
| plasmab | you may want to use classes if you want to optimise your structure later but dictionaries make great lazy iteraror classes iterator |
| cowbud | great lazy iterator classes? |
| plasmab | you know what an iterator pattern is? |
| EnsignRedshirt | A fancy-pants name for a loop? |
| plasmab | EnsignRedshirt, erm no. |
| EnsignRedshirt | (I hope the implied ":)" was obvious.) |
| plasmab | look isnt implemented in an iterator pattern:P ^loop |