Help understanding the decisions *behind* python?

sturlamolden sturlamolden at yahoo.no
Sat Aug 1 23:24:11 EDT 2009


On 31 Jul, 21:31, Masklinn <maskl... at masklinn.net> wrote:

> It's intuitive if you come to Python knowing other languages with  
> tuples (which are mostly functional, and in which tuples are *never*  
> sequences/iterables). At the end of the day, and if Guido's intention  
> truly was what Raymond says, implementing tuples as immutable sequence  
> was a mistake. And the documentation is to blame as well: in it,  
> tuples are clearly described as a *sequence* type, not a *structure*  
> type.

That depends on the readers' preconceptions: Only when the reader have
knowledge of C structs, Pascal records, or Java classes should this
matter. The naïve reader will not have preconceptions about a
difference between "structure types" and "sequence types". A more
advanced C programmer will also know that a struct is a form of a
sequence in C: you can e.g. memcpy any struct to a char array.




More information about the Python-list mailing list