Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > adding standard types to new type

Thread Tools

adding standard types to new type

Posts: n/a

I've created a new type using the API and want to add not only
methods (which is easy with PyMethodDef structure) but also insert
several Python standard type variables.
Is there some equivalent to PyModule_AddObject - just working on the
new type instead Module? Or do I have to add a dictionary to the new
type and insert the new variables to the dictionary?
What is the correct way?

Using the new type should be:

import NewTypeModule
<'method1', 'method2', 'variable1', ...>

Thanks a Lot!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Argument type of function and safe types and types, arguments canhandle safely ittium C++ 4 12-09-2011 11:05 AM
Standard integer types vs <stdint.h> types C Programming 163 01-28-2008 03:21 PM
"Incompatible types" error though types are same generic type Java 3 04-15-2007 02:36 PM
Adding a custom type to the list of Field Types David Hutz ASP .Net Datagrid Control 0 06-06-2006 02:26 PM
Request for feedback: adding vector types to STANDARD Peter Ashenden VHDL 5 12-17-2004 01:11 AM