enthought / enthought/python-analytics
It could be possible for a descriptor to be specified with multiple aliases
Đang mở
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
https://github.com/enthought/python-analytics/compare/enhancements#diff-2f6fddad3e699541f774b0d49e319c44
If the descriptor can be created with multiple alias names in the constructor, the metaclass can handle dropping the same descriptor instance onto the class with the aliased names.
(untested) example:
```
>>> class SomeEvent(metaclass=EventRecorder):
... some_value = TrackedAttribute('sv', int, aliases=('someValue',))
...
>>> event = SomeEvent()
>>> event.some_value = 5
>>> event.someValue
5
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.