Hello,
I recently hacked together a script called entanglement.py that uses
libclang to parse C++ headers and generate a Python wrapper that can
call the C++ symbols in a .so directly. The Itanium C++ ABI is easy
enough to call from ctypes with 1 exception. Returning a class by
value from C++ resu
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> Ethan Carter wrote or quoted:
>>## The question is how to write such an operator. I wrote this one:
>>def op(x, b):
>> return isinstance(x, int) or b
>
> The main snag with your op function and how you're using
> reduce is the switch-up in the
# -*- mode: python; python-indent-offset: 2 -*-
from functools import reduce
## I'm puzzle with this result of reduce. Can you spot where my mind
## is going wrong?
##
## The problem I want to solve with /reduce/ (merely for the sake of
## exercise) is to collapse a list of lists to a list of b