Shawn Walker wrote:
> Danek Duvall wrote:
>> On Tue, Jan 06, 2009 at 11:54:46AM -0600, Shawn Walker wrote:
>>
>>> http://cr.opensolaris.org/~swalker/pkg-5999-6010/
>> catalog.py:
>>
>>   - line 947: wouldn't it be better to compile this RE and store that
>>     outside of version_matches()?  In addition, this should probably be
> 
>  From what I understand, the re module has an internal cache that 
> automatically does this for re.search and re.match.  Hence why 
> re.purge() exists.
> 
>>     done the same way that we have PkgFmri and MatchingPkgFmri classes.
> 
> They don't seem to be related.  Those classes appear to be for 
> validation, while mine is to extract string components for filtering 
> (not really validation).  I would also be concerned about the overhead 
> of using a class like that.  However, I could be convinced that this 
> should be a method on the PkgFmri class, such as "is_matching_version" 
> (name suggestions?).  Would that suffice?

I realise that such a class would be needed at the point that we allow 
this type of input from a user for the purposes of "pkg list", etc.  But 
at the moment, I can't connect how I could re-use such a class for 
extract_matching_fmris() or why I would need it for 
extract_matching_fmris().

Cheers,
-- 
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to