pythoncom.Missing vs. pythoncom.Empty

Mark Hammond MarkH at ActiveState.com
Tue Feb 20 23:23:16 CET 2001


Syver Enstad wrote:

> Hi, what's the deal with pythoncom.Missing/Empty?
> 
> I've found while working with the MSMQ (MessageQueue) through COM on Win32
> that default arguments don't work unless I change the definitions of
> defaultNamedOptArg to pythoncom.Empty.
> 
> I am aware that the generated source states that there might be a reason to
> try this, but why, and what is the difference between them? It would also be
> very good to be able to specify in the gencache statement what to use for
> the various values so that one wouldn't have to use custom edited genpy
> files.

The different is in the way the args are presented.  "Empty" means the 
arg is presented with a type of VT_EMPTY.  Missing means the arg is not 
even presented to the object.

I have heard this reported before.  It is "Missing" simply due to Office 
95!!  I should change this and see who screams - my guess is noone any more!

Mark.
-- 
Nominate Your Favorite Programmers
for the Perl and Python Active Awards!
http://www.ActiveState.com/Awards/




More information about the Python-list mailing list