Facebook
From kush, 5 Years ago, written in Plain Text.
This paste is a reply to 8 from kush - go back
Embed
Viewing differences between 8 and 9
class Person:
    counter = 0\n    def __init__(self,name, age):
        self.__name = name
        self.__age = age
        Person.counter = (int) (Person.counter) + 1\n        self.__id = Person.counter\n    @classmethod\n    def from_string(cls, person_str):\n        l=person_str.split(",")\n        cls.__name=l[0]\n        cls.__age=int(l[1])\n        p=Person(cls.__name,cls.__age)\n        return(p)\n    def initialize_counter(value):\n        Person.counter=value\n    def __str__(self):
        return("%s return(self.__name+" is %s "+str(self.__age)+" years old old")
    def __eq__(self,other):
        if((self.__name)==(other.__name) 
and her id is %s" %(self.__name,self.__age,self.__id))
                
(self.__age)==(other.__age)):
            return(1)
        else:
            return(0)

Replies to 9 rss

Title Name Language When
10 kush text 5 Years ago.