Jason Tackaberry wrote:
> On 2007-03-22 08:35, Dirk Meyer wrote:
>> What about naming all parser classes Parser() just like Freevo names
>> all plugins PluginInterface. In that case we would
>>
>> | register('video/avi', ('wav','avi'), 'video.riff')
>>
>
> I'd prefer adding a function get_parser to each of them, that just
> returns the actual class. So it'd be like:
>
> from video.riff import get_parser
> riff_parser = get_parser()Should get_parser return the class or the object? It seems kind of ugly in each file to have: | def get_parser(): | return RiffInfo Maybe return on object: | def get_parser(file): | return RiffInfo(file) and this can be written as | get_parser = RiffInfo or maybe use the global Parser idea: | Parser = RiffInfo Dischi -- Love is Hate. War is Peace. Windows is stable.
pgpJEE1bQhZ7a.pgp
Description: PGP signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Freevo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-devel
