Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid to set attributes to cake #10

Open
Mityuha opened this issue Sep 4, 2022 · 0 comments
Open

Forbid to set attributes to cake #10

Mityuha opened this issue Sep 4, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Mityuha
Copy link
Owner

Mityuha commented Sep 4, 2022

Now it's possible to assign any attribute to cake

from bakery import Cake
cake = Cake(1)
cake.is_one = True
print(cake.is_one)  # True

And if object within cake has attribute with the same name it can lead to errors.
(maybe use __slots__ for all library classes?)

@Mityuha Mityuha added enhancement New feature or request good first issue Good for newcomers labels Sep 4, 2022
@roma-frolov roma-frolov self-assigned this Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants