Skip to content

Choose a more cautious formulation for what constructors return #19

Open
@chillenzer

Description

@chillenzer

"Equality and identity" in Chapter 1 states that "constructing a new object that is the same as an existing one will give a result that is equal, but not identical, to the existing one". This is not quite true in the most general case (despite being a reasonable assumption for practical purposes).

We should find a more cautious formulation for that. One suggestion was to add "by default" to the sentence (although that's still not quite right because the default for int is different for example). Maybe "usually" or just "It is useful to think about it as this although it's a bit more subtle".

Activity

edbennett

edbennett commented on Jun 2, 2023

@edbennett
Member

Ah, I'd forgotten the exact context for the statement. I'd prefer "usually" for brevity and minimal derailing, unless we leave it as-is in the spirit of lies to children

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @edbennett@chillenzer

        Issue actions

          Choose a more cautious formulation for what constructors return · Issue #19 · sa2c/python-oop-novice