win32com: _NewEnum being cached

Tom Hines tom_hines at
Fri Apr 28 16:46:04 EDT 2000

Hello.  As you know, to implement "for x in my_list" functionality in
COM, you must code a get__NewEnum() function, which I have done and it
works fine under Visual Basic.  But when called from Python, the call
seems to get cached, as subsequent Python "for" blocks don't result in
calls to get__NewEnum().

I have a COM class that implements a dynamic collection, so I
need "for" blocks to result in calls to get__NewEnum() every time.
Does anybody know how to force this?


Tom Hines
Rockville, MD

Sent via
Before you buy.

More information about the Python-list mailing list