Top.Mail.Ru
Python
? ?
LiveJournal for python.
View:Personal Journal.
View:Friends.
View:Calendar.
Missed some entries? Then simply jump to the previous day or the next day.

Sunday, May 23rd, 2004

Time:11:13 pm.
I'm just futzing around python, but i ran into something strange I was hoping someone more experienced with Python could explain to me. The below code recurses through a dependency structure in Gentoo. It works great as long as you only use the Portree class once, but if I use the class more than once the second instance appears to use the first's variables. For instance:

a = Portree('gaim')
b = Portree('fluxbox')

b.depgraph will be a's depgraph with just a few more things. After some investigation I found the problem to be in the "dig" routine -- which appears to be getting res automagically populating. Or at least thats what I think. Any help would be appreciated. Code is GPL because I stole some of it from 'equery' which is also GPL. I'm just learning so please go easy on me.

source insideCollapse )
Comments: Read 7 orAdd Your Own.

LiveJournal for python.

View:User Info.
View:Friends.
View:Calendar.
View:Memories.
Missed some entries? Then simply jump to the previous day or the next day.

Image