This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author landonjpginn
Recipients landonjpginn
Date 2021-12-19.18:15:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639937709.73.0.49042724739.issue46134@roundup.psfhosted.org>
In-reply-to
Content
from dataclasses import dataclass, field

@dataclass(order=True, frozen=True)
class Character:
    sort_index: int = field(init=False, repr=False)
    name: str
    job: str
    age: int
    intelligence: int = 50

    def __post_init__(self):
        object.__setattr__(self, 'sortindex', self.intelligence)

Description:
using sortindex instead of sort_index gave the following suggestion: 

Current:
AttributeError: 'Character' object has no attribute 'sort_index'. Did you mean: 'sortindex'?


Expected: 
AttributeError: 'Character' object has no attribute 'sortindex'. Did you mean: 'sort_index'?
History
Date User Action Args
2021-12-19 18:15:09landonjpginnsetrecipients: + landonjpginn
2021-12-19 18:15:09landonjpginnsetmessageid: <1639937709.73.0.49042724739.issue46134@roundup.psfhosted.org>
2021-12-19 18:15:09landonjpginnlinkissue46134 messages
2021-12-19 18:15:09landonjpginncreate