|
|
Log in / Subscribe / Register

The next 20 years of Python

The next 20 years of Python

Posted Jul 11, 2013 14:09 UTC (Thu) by juliank (guest, #45896)
In reply to: The next 20 years of Python by mpr22
Parent article: The next 20 years of Python

Well, it does, but it's still only a run-time check, and those are not very useful. And in Python 3, you can write things like:

def f(x: int, y: int, z: int) -> int:
return x * y * z

Combined with a decorator or a meta-class, you can use this for run-time type checking as well. But it's still only at run-time, and not static, at compile-time.


to post comments

The next 20 years of Python

Posted Jul 22, 2013 6:28 UTC (Mon) by smurf (subscriber, #17840) [Link]

Well, Python isn't compiled, strictly speaking, so that's hardly a surprise.

However, once you do have those annotations, running an analyzer over the bytecode which verifies a large subset of them shouldn't be *that* hard to write.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds