Wiki

Changes between Version 3 and Version 4 of Literals

Show
Ignore:
Timestamp:
11/22/10 19:57:27 (14 years ago)
Author:
todd.a
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Literals

    v3 v4  
    1111e.g  
    1212{{{ 
     13#!cobra 
    1314names = [ 'mike', 'gary', 'pat', 'bruce', 'paul'] # List<of String> 
    1415heads = [3,1,1,1,1] # List<of int> 
     
    2627e.g. 
    2728{{{ 
     29#!cobra 
    2830nameId = { 'mike':10110, 'gary':21003, 'paul':32289 }  # Dictionary<of String, int> 
    2931assert nameId['mike'] == 10110 
     
    4244e.g. 
    4345{{{ 
     46#!cobra 
    4447names= {'gary', 'mike', 'bruce', 'paul'} 
    4548assert names.intersection({'gary', 'paul'} == {'gary', 'paul'} 
     
    7578 
    7679{{{ 
     80#!cobra 
    7781d = 123      # default (Decimal) 
    7882d = 123.4d