diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-02-17 11:25:16 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-02-17 11:25:16 -0500 |
| commit | 6c039941cfa2d06cdeed03b471f0a25ffb12c3a8 (patch) | |
| tree | 6f32fe34f4e48e01e8b4c521ae01dfe1f2903c29 | |
| parent | 5355171d538ad868cbbf1fa06bda21e7b969a8f2 (diff) | |
| download | sqlalchemy-6c039941cfa2d06cdeed03b471f0a25ffb12c3a8.tar.gz | |
more edits
I can only see issues in the docs when they're live on the
site, sorry
Change-Id: I948b7c8e37657ca85d02843211cbfdb03aa5da75
| -rw-r--r-- | lib/sqlalchemy/ext/hybrid.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py index 735e46716..4e0fd4604 100644 --- a/lib/sqlalchemy/ext/hybrid.py +++ b/lib/sqlalchemy/ext/hybrid.py @@ -232,7 +232,7 @@ example below that illustrates the use of :meth:`.hybrid_property.setter` and Above, there are three ``Interval.radius`` methods, but as each are decorated, first by the :class:`.hybrid_property` decorator and then by the ``@radius`` name itself, the end effect is that ``Interval.radius`` is -a single attribute with two different functions contained within it. +a single attribute with three different functions contained within it. This style of use is taken from `Python's documented use of @property <https://docs.python.org/3/library/functions.html#property>`_. It is important to note that the way both ``@property`` as well as @@ -247,7 +247,7 @@ mypy and pyright. Python's own ``@property`` decorator does not have this limitation only because `these tools hardcode the behavior of @property <https://github.com/python/typing/discussions/1102>`_, meaning this syntax -is no longer available to SQLAlchemy under :pep:`484` compliance. +is not available to SQLAlchemy under :pep:`484` compliance. In order to produce a reasonable syntax while remaining typing compliant, the :attr:`.hybrid_property.inplace` decorator allows the same |
