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

Namesto GeneratedDataIncorrect uporabi validate #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matijapretnar
Copy link
Contributor

Vsi primeri uporabe izjeme GeneratedDataIncorrect, ki ponovno sproži generiranje podatkov, so bili oblike

if not (pogoj1 and pogoj2 and pogoj3):
    raise GeneratedDataIncorrect

kar je točno

self.validate(pogoj1 and pogoj2 and pogoj3)

oz. še lepše

self.validate(pogoj1)
self.validate(pogoj2)
self.validate(pogoj3)

V resnici ne vidim razloga, da bi kdo to izjemo uporabljal drugače, zato sem jo naredil za zasebno. Poleg tega je ni treba več vsakič uvažati.

@katjabercic - tale PR je zate, da se ogreješ za Programsko opremo pri pouku.

@matijapretnar matijapretnar force-pushed the validate-namesto-generated-data-incorrect branch from 293822a to 79612cc Compare March 24, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant