[
https://issues.apache.org/jira/browse/AVRO-3796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated AVRO-3796:
---------------------------------
Labels: pull-request-available (was: )
> Use decorator and methods to express properties
> -----------------------------------------------
>
> Key: AVRO-3796
> URL: https://issues.apache.org/jira/browse/AVRO-3796
> Project: Apache Avro
> Issue Type: Task
> Components: python
> Affects Versions: 1.11.2
> Reporter: Michael A. Smith
> Assignee: Michael A. Smith
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> One of the issues preventing progress on AVRO-2921 is that it's difficult to
> add type hints to properties when they're expressed like this:
> {code:java}
> class Thing:
> x = property(lambda self: self._x){code}
> as they often are in the python source code. So I would like to refactor all
> the cases where this occurs to the decorator style, like this
> {code:java}
> class Thing:
> @property
> def x(self):
> return self._x{code}
> This will make it easier to add type hints to these methods later on.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)