#6702: ModelForm: assert given instance is instance of model
-----------------------+----------------------------------------------------
Reporter: guettli | Owner: nobody
Status: new | Component: django.newforms
Version: SVN | Resolution:
Keywords: | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-----------------------+----------------------------------------------------
Changes (by mtredinnick):
* stage: Unreviewed => Accepted
Comment:
An assert is fine here. Asserts are the right control structure for
checking that the programmer did what they were meant to do in any case,
since it's not user-supplied data (which would require a non-vanishing
error). Let's remember that this is Python: ask forgiveness, not
permission and all that. Paranoid pre-execution type checking isn't the
norm.
--
Ticket URL: <http://code.djangoproject.com/ticket/6702#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---