#12338: "Overriding predefined model methods": use *args, **kwargs in code 
sample
------------------------------------+---------------------------------------
          Reporter:  blueyed        |         Owner:  nobody
            Status:  new            |     Milestone:        
         Component:  Documentation  |       Version:  SVN   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  1     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by alexr):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I'm not sure that you want to pass through all args and kwargs. If I pass
 anything other than force_insert or force_update to my function then I
 will get TypeError (unexpected keyword argument) when that argument is
 passed into the model's save method. The model's save method doesn't
 accept **kwargs, so passing that to it is asking for trouble.

 Just my 2 cents.
 Alex

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12338#comment:1>
Django <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.


Reply via email to