2010/11/12 Stefan Behnel <[email protected]>:
> Vitja Makarov, 12.11.2010 08:06:
>> 2010/11/8 Stefan Behnel:
>>> The problem is not the property behaviour, it's the mapping from a Python
>>> function/method to a C function, which must have a unique name. Currently,
>>> functions are unique within one namespace, be it the module namespace or a
>>> class body namespace. They are actually looked up statically, not
>>> dynamically in definition order, so the fix is not as easy as adding a
>>> counted ID to the C-level name.
>>
>> Is not it safe to add ID to C-function in pure python class scope?
>> I see problem in module scope when it turns functions into list of
>> methoddef that are passed to PyModule_Init.
>
> As I said, it's not *enough* to fix the name.
>
Can please you explain the problem? What more should be done?
I see problem in decorators here:
clsas Foo(object):
@property
def foo(self)
....
@foo.setter
def foo(self, val):
....
Setter Cython first sets foo item, then get it back and decorate with
setter attribute:
dict['foo'] = Foo_foo_method_000
dict['foo'] = property(dict['foo'])
dict['foo'] = Foo_foo_method_001
dict['foo'] = dict['foo'].setter(dict['foo'])
Am I right here? I see problem in decorators, attribute assignment here.
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev