On 9/12/06, JP <[EMAIL PROTECTED]> wrote:
> > class Form(object):
> >     fields = {} # This gets filled with field names and data types.
> >     def bind(self, **kwargs):
> >         "Returns a BoundForm instance for the given kwargs."
> >         return BoundForm(self, kwargs)
>
> What's the rationale for using **kwargs instead of a single data
> parameter? I think there are two big advantages to a single parameter
> vs. kwargs: first, there are legal form field names that aren't legal
> python identifiers, and second, it lets you use anything dict-like as a
> form data source -- with the natural next step of a ModelForm that
> takes a model instance as its bind parameter.

Open-source software development is awesome. Thanks for making this
fantastic point!

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to