Hi folks --
Quick proposal: what do y'all think about having ``object.save()``
return ``object``? It's slightly Java-ish, but it would allow::
p = Person(first_name="Jacob", last_name="Kaplan-Moss").save()
instead of the current two-line idiom of::
p = Person(first_name="Jacob", last_name="Kaplan-Moss")
p.save()
I find myself doing the later all the freeking time and kinda want a
one-liner...
The other way to spell this might be::
p = Person.objects.create(...)
Which is kinda orthogonal to ``get_or_create``.
Thoughts?
Jacob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers
-~----------~----~----~----~------~----~------~--~---