Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
class Dog: def __init__(self, name, breed): self.name = 'Dog Name' self.breed = 'Dog Breed' self.dog_list =  # because 'dogs' in add_dog(**dogs) turned out to be undefined, # not sure why... def keywords_as_dict(**dogs): return dogs def add_dog(**dogs): while True: try: name = raw_input("Enter dog name: ") breed = raw_input("Enter dog breed: ") for name, breed in dogs.items(): my_dog = (name.capitalize() + ": " + breed.capitalize()) print(my_dog) dog_list.append(my_dog) except name == '': print('Exiting program') return dogs, dog_list if __name__ == "__main__": zero = Dog(name='Lassie', breed='Retriever') # or one = Dog('Lassie', 'Retriever') print(zero, one) # prints <__main__.Dog instance at some hex code> for each Dog.add_dog(one) # type error, method takes 0 args Dog.add_dog() # or Dog.add_dog('Goofy', 'mutt') # or Dog.add_dog(name='Goofy', breed='mutt') # type errors, # unbound methods must be called with class instance as first argument
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.