A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-September/149560.html below:

[Python-Dev] PEP 549: Instance Properties (aka: module properties)

[Python-Dev] PEP 549: Instance Properties (aka: module properties) [Python-Dev] PEP 549: Instance Properties (aka: module properties)Ivan Levkivskyi levkivskyi at gmail.com
Thu Sep 14 17:02:00 EDT 2017
On 14 September 2017 at 22:07, Ethan Furman <ethan at stoneleaf.us> wrote:

> For comparison's sake, what would the above look like using __class__
> assignment?  And what is the performance difference?
>
>
FWIW I found a different solution:

# file mod.py

from typing_extensions import allow_forward_references
allow_forward_references()
from mod import Vertex, Edge  # the import is from this same module.

It works both with __class__ assignment and with __getattr__

--
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170914/e0cabac0/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4