Josh Rosenberg <> added the comment:

Do data classes let you define some fields as being excluded from the 
equality/ordering/hashing? I got the impression that if a field existed, it was 
part of the "key" no matter what, which isn't necessarily correct in the 
general case. Simple examples would be attributes that equivalent C++ would tag 
with the mutable keyword; they're not part of the logical state of the instance 
(e.g. debugging counters or whatever), so they shouldn't be included in the 


Python tracker <>
Python-bugs-list mailing list

Reply via email to