going in the python docs we find this

> If at all possible, this should look like a valid Python expression that 
> could be used to recreate an object with the same value (given an 
> appropriate environment).

so maybe something that returned ModelName(field1=value1, field2=value2 
...) where fields with references could return the id of the reference to 
avoid DB lookups 

sábado, 18 de Maio de 2013 às 17:04:48 UTC+1, Patryk Zawadzki escreveu:
>
> As suggested by Marc Tamlyn I am posting this here for discussion: 
>
> https://code.djangoproject.com/ticket/20448 
>
> tl;dr: 
>
> Currently __repr__() calls __unicode__() which can be a very bad 
> thing. You really don't want things like an exception being raised or 
> debugger being used to cause additional side effects (like executing a 
> database query inside __unicode__). 
>
> -- 
> Patryk Zawadzki 
> I solve problems. 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/1c59d03d-49da-4bfa-836b-31c7d42b63d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to