You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Michael A. Smith (Jira)" <ji...@apache.org> on 2023/07/14 01:49:00 UTC
[jira] [Created] (AVRO-3796) Use decorator and methods to express properties
Michael A. Smith created AVRO-3796:
--------------------------------------
Summary: 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
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)