For a while now, Python has allowed return types to be specified in signatures:
def f() -> int: It is my understanding that this doesn't actually do any error-checking or type-checking — see https://docs.python.org/3/library/typing.html. So this works without error: def f() -> float: return "hello" This is cropping up in the Sage library. The file combinat/permutation.py has several methods that claim (according to their signature) to return an `Integer` but actually return an `int`, and this has led to at least one person being confused (a recent post on stackexchange cited in the github issue). Anyway, I've opened https://github.com/sagemath/sage/issues/36198 for one of these instances, and we should be aware of this. -- John -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/63bea4e5-ba57-4ddf-b59c-b46d59e3505bn%40googlegroups.com.