0

PyCLIPS は、非常に大きな数値を変換する前に int に変換しているようです。

変換はこちらPython -> CLIPS

def _py2cl(o):
    """convert Python data to a well-formed tuple"""
    t1 = type(o)
    if t1 in (int, long):
        return (_c.INTEGER, int(o))

しかし、ここでも変換 CLIPS -> Python

...
def _cl2py(o):
    """convert a well-formed tuple to one of the CLIPS wrappers"""
    if o is None: return None
    elif type(o) == tuple and len(o) == 2:
        if o[0] == _c.INTEGER:
            return Integer(o[1])
...


...
# 1) numeric types
class Integer(int):
    """extend an int for use with CLIPS"""
    def __repr__(self):
        return "<Integer %s>" % int.__repr__(self)
    def __add__(self, o):
        return Integer(int(self) + int(o))
...

CLIPSにもPyCLIPSにも、長い間タイプがないというのは正しいですか? すべてが int にキャスト (切り捨て) されていますか? これはバグですか?

6442901632python-call を介して CLIPS から python に値を渡すと、python の値になるため、私は尋ねています0x7fffffff。または、私の 32 ビット Python が問題の原因ですか?

intPyClips 経由で CLIPS から Python にPython より大きい値を渡すにはどうすればよいですか?

4

0 に答える 0