RSS Amplifier

PGJones' blog · Feb 26, 2020

Is there a startup time cost to type hinting?

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Type hints in Python 3 are executed at import time at a computational cost. This cost can removed in Python >= 3.7 via from __future__ import annotations, see PEP-563. The startup time when importing quart is measured both with and without the future import with no difference observed.

Read on pgjones.dev

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.