OT: This Swift thing

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Jun 5 19:08:50 EDT 2014


On 2014年6月05日 22:07:18 +0200, Alain Ketterlin wrote:
> Sturla Molden <sturla.molden at gmail.com> writes:
>>> On 05/06/14 10:14, Alain Ketterlin wrote:
>>>>> Type safety.
>>>> Perhaps. Python has strong type safety.
>> Come on.

No, Sturla is correct. Python has strongly-typed values and dynamically-
typed variables, which means that you get type errors at run-time, not 
compile-time. But you still get type errors:
py> '1' + 2
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
TypeError: Can't convert 'int' object to str implicitly
[...]
>> When I compile Cython modules I use LLVM on this computer.
>> Cython is not Python, it is another language, with an incompatible
> syntax.

Cython is best considered a superset of Python, with a pure-Python 
compatibility mode. It can run standard Python code.
-- 
Steven D'Aprano
http://import-that.dreamwidth.org/


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /