Carl Chenet <cha...@ohmytux.com> added the comment:

Hi,

Maybe you have some ideas on this patch? I think it could be a nice
feature e.g in my app I need to support every hash algorithms available
so with optparse module it is possible to write something like :
 
        for __hashtype in ('md5', 'sha1',
'sha224','sha256','sha384','sha512'):
            __parser.add_option('--{}'.format(__hashtype), dest='hashtype',
                action='store_const', const='{}'.format(__hashtype),
                help='use the {} hash algorithm type'.format(__hashtype))
        __options, _ = __parser.parse_args()

And it would be better if this tuple could be provided by the hashlib
module itself, making the code more evolutive.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7418>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to