[ 
https://issues.apache.org/jira/browse/AVRO-3796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743543#comment-17743543
 ] 

ASF subversion and git services commented on AVRO-3796:
-------------------------------------------------------

Commit 12d05859d97cf3bc05c2a3cc87df320a6fd8786c in avro's branch 
refs/heads/master from Michael A. Smith
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=12d05859d ]

AVRO-3796: Use Property Decorator (#2348)



> 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: 20m
>  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)

Reply via email to