enthought / enthought/traits

cTrait overloads delegate_name and delegate_prefix for property getters and setters

Open
#664 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Currently `cTrait` makes use of the `delegate_name` and `delegate_prefix` both to hold strings that refer to delegates, and to hold property trait getters and setters (which are callables), respectively.

While this might save a few bytes on the `cTrait` instance, it is quite confusing when reading the `ctraits.c` source code.

Furthermore, for properties, you can call `property` with no arguments to get the getter, setter and validator, but there is no similar call to get the delegate name or delegate prefix.

This should probably be cleaned up. If space is at a premium, we should re-name the variables to something more generic and then use clear names in methods where they are accessed; otherwise we should just have two extra values for the getter and setter of properties. Or re-architect in a better way.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.