That documentation is for serializing classes. There's a note box that 
says, "This return value is different from the deconstruct() method for 
custom fields 
<https://docs.djangoproject.com/en/3.2/howto/custom-model-fields/#custom-field-deconstruct-method>
 
which returns a tuple of four items."

On Saturday, September 18, 2021 at 11:06:41 AM UTC-4 Christian González 
wrote:

> Hi,
>
> before I issue a bugreport, I'll ask here first.
>
> On 
> https://docs.djangoproject.com/en/3.2/topics/migrations/#adding-a-deconstruct-method
>  
> I can read that deconstruct() returns a 3-tuple.
>
> When I see the code in django.db.models.fields.__init__.py, 
> Field.deconstruct() does a
>
>     return (self.name, path, [], keywords)
>
>     
>
> This is a 4-tuple, and even the clone() method written after it calls it 
> with
>
>     name, path, args, kwargs = self.deconstruct()
>
> So, is 3.2 documentation here on a <1.9 status? Am I understanding 
> something not correctly?
>
> Thanks,
>
> Christian
>
> -- 
> Dr. Christian Gonzálezhttps://nerdocs.at
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/069eb2d7-e406-4fb5-a736-bd1b8507f937n%40googlegroups.com.

Reply via email to