Re:Strong Types and Their Impact on Testing
by pekk on Tuesday November 18, 2014 @01:53PM
(#8625561)
What would it help, in Python, to have 'list of int'?
[ Parent
| on HN ]
Re:Strong Types and Their Impact on Testing
by _yosefk on Tuesday November 18, 2014 @02:53PM
(#8625933)
A more compact representation is one advantage - that's why numpy has array of int.
Re:Strong Types and Their Impact on Testing
by codygman on Wednesday November 19, 2014 @10:16AM
(#8630440)
You don't have to validate all objects inside of that list are an int or handle cases via duck typing, exceptions, etc.
As _yosefk said, the interpreter can assume a more compact representation.