Ministério da Educação
Brasil um país de todos
Personal tools
Navigation
Log in


Forgot your password?
 
Document Actions

testecmp.py

by Cicero Garrozi last modified 2014-08-05 06:55

Click here to get the file

Size 1 kB - File type text/python-source

File contents

class TesteCmp:
    nome = ''
    valor1 = 0
    valor2 = 0
    def __init__(self, nome, v1, v2):
        self.nome = nome
        self.valor1 = v1
        self.valor2 = v2

    def __cmp__(self, outro):
        return cmp(self.valor2, outro.valor2)
    def __repr__(self):
        return self.nome

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: