Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 0.7
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
l as duck = [1, 2, 3]
assert 1 == l[0]
assert 3 == l[-1]
Another example:
json = {'A':"B",'C':[1,null,3,"ABC",
{"D":56,"E":"JSON"}]}
//won't work with or without duck typing
print json["C"][4]["E"]
This JSON format can be used as an alternative to XML. See http://www.crockford.com/JSON/index.html