I want to get the maximum and the minimum values of various numbers. Is
the following method the best way to do it?

for tag in q:
            num = tag.artista_set.count()

            if num_ant:
                if num < num_ant:
                    min_art = num
            else:
                num_ant = num

            if num > max_art:
                max_art = num

Thank you!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to