On Thu, Aug 19, 2004, Geoffrey Biggs wrote: > > I'm trying to add a new built-in number data type to Python with its own > syntax, so I'm working directly with the interpreter rather than > creating my own extension module (side note: I've appended something > extra to the version thing in the Makefile - I doubt this is relevant to > the problem but it's probably best you have all the info). The complex > data type is similar to what I'm trying to do so I've been following > that as an example. I've successfully extended the tokenizer and the > parsenumber() function in compile.c to do what I want and written the > data type in my two new files Objects/mynewobject.c and > Include/mynewobject.h. I've included mynewobject.h in Python.h and added > the two files to the Makefile. > However, when I tried to run the code by typing in the syntax to produce > my data type, Python suffers a segmentation fault. Unless you're planning to attempt pushing this into the core at some point in the future, you're best off asking on comp.lang.python; although some of the core developers no longer have time for c.l.py, they're also not likely to answer your questions here, either. ;-) -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "To me vi is Zen. To use vi is to practice zen. Every command is a koan. Profound to the user, unintelligible to the uninitiated. You discover truth everytime you use it." --reddy at lion.austin.ibm.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4