[Python-ideas] Delay evaluation of annotations

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Sep 23 01:39:28 EDT 2016


David Mertz wrote:
> I guess once in a while we'll see e.g. 
>  `Sequence[CustomThing]`, but it will be uncommon for that typing 
> involving `CutomThing` to be within CustomThing itself

I think that depends on what kind of software you're
writing. Anything involving any kind of trees or graphs
will have classes that refer to themselves or each other.

> (well, unless you 
> use much more recursion than Python encourages).

Recursive data structures don't necessarily imply
recursive code to process them, although recursion is
often the most natural way to write that code.

-- 
Greg


More information about the Python-ideas mailing list