DenkzeitWiki

Suchen:

Aktuelle Änderungen Printable View Änderungen Bearbeiten

WebServices > DickGabriel > RichardGabriel > ZenOfPython > UsefulTools > WikiGroup > RubyOnRails > MyPythonLib > LispForDsls > TortoiseSVN > Steffen > AboutMe > SmartPython > CommentSpam > SegelReviere > AntiPatterns > PythonTypingClear Trail
Main /

Python Typing

Python
TypeTheory

RPython

Why?

Why could one opt for types in a language?
The possibility to optimize at compile-time. (No!)
To find some bugs (typos, type mismatches (taking the square root of an dictionary)) early.






I suspect more mileage will be found with type inference rather than explicit type declarations, and this would allow Python to stay Python.[1]


DuckTyping:

If the object supports all the methods in the interface, then it implements the interface.[2]


A unit test can define not just the signature, but also semantics of objects. This can include any condition expressable in Python, including things like pre-/post- conditions and invariants. As I see it, this provides all the power of interfaces, without needing any additional language magic.[3]





Edit - BackLinks - Tags - Page Hist - Print - Changes - Home - Orphans - Help

Zuletzt geändert am 29.09.2008 20:46 Uhr und seit 7. April 2005 1354 aufgerufen.