[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame for SDL 2, and how it may look.



On 17-04-20 05:32 PM, Greg Ewing wrote:
Lenard Lindstrom wrote:
Unfortunately, the special parser machinery to support Cython includes is only implemented at the module level. It was never generalized to work in any code block.

The include statement in Pyrex was something of a hack that I
used for sharing declarations before the cimport mechanism
existed. I regarded it as more or less obsolete after that
and didn't develop it any further.

You could put in a feature request to the Cython developers.

I did consider submitting a patch. But since the consensus is to have a distinct Window class, there is no need for it in Pygame. But, just for the fun of it, I would like to add a proper mixin system like D's, possibly with parameters:

def mixin foo(a):

    def f(self, x):

        return self.a * x


class C:

    def __init__(v):

        self.v = v


    mixin foo(v)


Just a thought.