Skip to content

Commit

Permalink
Fix type in custom_classes.md (#1096)
Browse files Browse the repository at this point in the history
  • Loading branch information
connortann authored Jun 18, 2024
1 parent 1947a3a commit 123bc4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/develop/concepts/app-design/custom-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Marshall_C = Student(1, "Marshall")
Marshall_A == Marshall_C
```

In this example, the dataclass `Student` is defined twice. All three Marshalls have the same internal values. If you compare `Marshall_A` and `Marshall_B` they will be equal because they were both created from the first definition of `Student`. However, if you compare `Marshall_A` and `Marshall_C` they will not be equal because `Marshall_C` was created from the _second_ definition of `Student`. Even though both `Student` dataclasses are defined exactly the same, they have differnt in-memory IDs and are therefore different.
In this example, the dataclass `Student` is defined twice. All three Marshalls have the same internal values. If you compare `Marshall_A` and `Marshall_B` they will be equal because they were both created from the first definition of `Student`. However, if you compare `Marshall_A` and `Marshall_C` they will not be equal because `Marshall_C` was created from the _second_ definition of `Student`. Even though both `Student` dataclasses are defined exactly the same, they have different in-memory IDs and are therefore different.

### What's happening in Streamlit?

Expand Down

0 comments on commit 123bc4c

Please sign in to comment.