[Python-Dev] PEP 557: Data Classes

Eric V. Smith eric at trueblade.com
Thu Oct 12 19:44:19 EDT 2017


On 10/12/2017 6:33 PM, Chris Barker wrote:
> On Thu, Oct 12, 2017 at 3:20 AM, Steve Holden <steve at holdenweb.com 
> <mailto:steve at holdenweb.com>> wrote:
> 
>       The reason I liked "row" as a name is because it resembles 
>     "vector" and hence is loosely assocaited with the concept of a tuple
>     as well as being familiar to database users. In fact the answer to a
>     relational query was, I believe, originally formally defined as a
>     set of tuples.
> 
> 
> Is the intent that these things preserve order?

In the sense that the parameters to __init__(), the appearance in the 
repr, the order of the returned tuple in as_tuple(), and the order of 
comparisons will be the same as the order that the fields are defined, 
then yes.

Eric.


More information about the Python-Dev mailing list