Commits

Shashank Bharadwaj committed 652007c

little changes

Comments (0)

Files changed (1)

pycon-2013/talk.md

 Gradual Typing
 ==============
 
-* Proposed by Jeremy Siek & Walid Taha; extended by others
-* Introduces a dynamic type in an static language
-* Seamless integration between statically typed part and dynamically 
-  typed parts of code in the langugage
+* A new type system proposed by Jeremy Siek & Walid Taha; extended by others
+* Introduces a dynamic type in a static language
+* Seamless integration between statically typed parts and dynamically 
+  typed parts of code in the language
 * Guarantees that statically typed part (after type checking) will not 
   raise type error at runtime.
 
 Gradual Typing for Python
 =========================
 
-* `gradual` module in Python 3.x
-* Provides type checking based on type annotations 
+* `gradual` module for Python 3.x
+* Provides type checking based on user defined type annotations 
 * Uses function annotations and decoraters
 
 Gradual Typing for Python - Example
 ===================================
 
 ~~~~~
-from gradual import typed, obj, func
+from gradual import typed
 
 @typed
 class YourAwesomeApi(object):
     def answerToLife(self, a: int, b: int) -> int:
         return a + b
     
-def use_api(x: YourAwesomeApi):
+def use_api(x):
     print(x.answerToLife(10, 32))
     print(x.answerToLife('hello', 'there'))
     # TypeError: Expected int, got:
 * Use Gradual Typing to enable direct importing of Python code in Java
 
 * Most Python code has one-one corrospondence with Java code
-* Drive type information to generate idiomatic Java code (where applicable
+* Drive type information to generate idiomatic Java code (where applicable)
 
 
 Questions