[py-dev] Re: [py-svn] r12006 - in py/dist/py/test: . terminal

holger krekel hpk at trillke.net
Thu May 12 14:12:52 CEST 2005


Hi Jan! 

On Tue, May 10, 2005 at 10:47 +0200, Jan Balster wrote:
> holger krekel wrote:
> 
> > not before the end of the week, sorry (i am just leaving the door). 
> > can you provide an example meanwhile? 
> > 
> 
> Yes, and a simple hack to fix the problem. I think you will find a
> cleaner/better solution :-)

Thanks for the examples.  What you state and propose all 
makes sense. 

Actually I was thinking about making buildname2items()
building a list so that there would be no sort issues.  I.e. 

    builditems()  -> returns list of items in appropriate 
                     sort order already and/or we simply expect 
                     items to have a sensible __cmp__ method 
                     so that listofitems.sort() always works 
                     as expected. 

and Collector.run() would usually simply do

    self._builditems_if_not_done_already() 
    return [x.name for x in self.items] 
   
and for the join() method we might want to cache a name2items
dictionary mapping if that proves to be a bottleneck.  

What do you think? 

cheers, 

    holger



More information about the Pytest-dev mailing list