Re: PROPOSAL: A Generic Python Object Interface for Python C Modules

Jim Fulton (jfulton@disqvarsa.er.usgs.GOV)
Thu, 2 Mar 1995 18:02:56 GMT

>>>>> "Guido" == Guido van Rossum <Guido.van.Rossum@cwi.nl> writes:
In article <9503021416.AA09958=guido@voorn.cwi.nl> Guido.van.Rossum@cwi.nl writes:

>> - A more complete definition. For instance, there's no easy
>> way to build a tuple; above, I built a list, set item 0,
>> and then convered to a tuple. But Tuple_New seems useless:
>>
>> PyObject *args = PyTuple_New(1);
>> <how to set a tuple's item here: sq_ass_item not defined?>
>>
>> Of course, I could revert to the tuple's C functions, but
>> this defeats the purpose. These functions aren't tuple
>> 'methods', so there's no way to get to them as object Attr's.

> Well, since you are creating a tuple it looks like it's no great sin
> to use the tuple specific functions on it, i.e. settupleitem() (in 1.1
> terminology; PyTuple_SetItem in 1.2). That's not part of Jim's
> proposal only because it already exists.

Actually, it's not in my proposal because it is another part of the
interface, the type-specific part. I see my proposal as covering an
area of functionality (abstract access to objects), and I don't care
if parts are already done.

--
-- Jim Fulton      jfulton@mailqvarsa.er.usgs.gov    (703) 648-5622
                   U.S. Geological Survey, Reston VA  22092 
This message is being posted to obtain or provide technical information
relating to my duties at the U.S. Geological Survey.