[New-bugs-announce] [issue7877] Iterators over _winreg EnumKey and EnumValue results
report at bugs.python.org
Sun Feb 7 22:31:40 CET 2010
New submission from Brian Curtin <curtin at acm.org>:
While EnumKey and EnumValue directly implement the underlying Windows calls of the same name, they don't feel very Pythonic. The user has to create their own loop and increment a counter to get all of the keys or values, stopping the loop when WindowsError is raised.
I created IterKey and IterValue, iterators over RegEnumKeyEx and RegEnumValueEx respectively. This mainly began as playing around with writing Python iterators in C, but has proven to work pretty nicely so I figured I'd put it out there.
Patch includes docs and tests. Comments/suggestions welcome and appreciated.
components: Library (Lib), Windows
keywords: needs review, patch, patch
stage: patch review
title: Iterators over _winreg EnumKey and EnumValue results
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file16170/keyvalue_iterators.diff
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce