|
|
Subscribe / Log in / New account

Type hinting for Python

Type hinting for Python

Posted Dec 26, 2014 6:06 UTC (Fri) by josh (subscriber, #17465)
In reply to: Type hinting for Python by mathstuf
Parent article: Type hinting for Python

> This would require new syntax and therefore be backwards incompatible.

As in, code written to use types would not work with Python pre-3.5?

That really doesn't seem like a problem. Plenty of code currently requires 2.7 and won't work with 2.6, for instance.


to post comments

Type hinting for Python

Posted Dec 27, 2014 3:28 UTC (Sat) by mathstuf (subscriber, #69389) [Link] (1 responses)

Python has gotten a lot of flak for breaking compatibility already and it seems they're taking further steps in that direction carefully which I prefer to "eh, you should use the latest anyways". Not everyone has such a luxury :( .

Type hinting for Python

Posted Dec 29, 2014 18:14 UTC (Mon) by iabervon (subscriber, #722) [Link]

Changes where some files that previously would have given syntax errors now don't aren't really a big deal; what they've gotten flak for is changes where files that were previously valid don't do the same thing or are invalid.

In fact, they're technically breaking compatibility more with the comment mechanism, in that a file with comments that are close to being type declarations but aren't quite right for this system will presumably generate whatever effects type mismatches end up having (mitigated somewhat by the fact that doing anything with the annotations won't happen without a proactive step).


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