}) >>> people.append({ “name”: “Bar” “age”: 28 }) >>> [ person[“age”] + 2 for person in people ] ... TypeError: cannot concatenate 'str' and 'int' objects PYTHON
}) >>> people.append({ “name”: “Bar” “age”: 28 }) >>> [ person[“age”] + 2 for person in people ] ... TypeError: cannot concatenate 'str' and 'int' objects PYTHON RUNTIME
“Foo”, Age = “26” }); people.Add(new Person { Name = “Bar”, Age = 28 }); people.Select(p => p.Age + 2); C# class Person { public string Name {get; set;} public int Age {get; set;} }
“Foo”, Age = “26” }); people.Add(new Person { Name = “Bar”, Age = 28 }); people.Select(p => p.Age + 2); C# class Person { public string Name {get; set;} public int Age {get; set;} } Cannot implicitly convert type 'string' to 'int'
“Foo”, Age = “26” }); people.Add(new Person { Name = “Bar”, Age = 28 }); people.Select(p => p.Age + 2); C# class Person { public string Name {get; set;} public int Age {get; set;} } Cannot implicitly convert type 'string' to 'int' COMPILE TIME