Animal#

class test_package.animals.Animal(name, sound, num_legs=5)[source]#

Bases: object

Deprecated since version 1.0: The Animal class is deprecated and may be removed in version 1.1. Use sunpy.net.Fido instead.

A deprecated class used to represent an Animal.

Note

  • This is a note.

Warning

  • This is a warning.

name#

The name of the animal.

Type:

str

sound#

The sound that the animal makes.

Type:

str

num_legs#

The number of legs the animal has (default 4).

Type:

int

Examples

>>> import datetime
>>> datetime.datetime(2019, 8, 16, 22, 46, 37, 856437)
datetime.datetime(2019, 8, 16, 22, 46, 37, 856437)

References

Attributes Summary

says_str

Methods Summary

says([sound])

Prints what the animals name is and what sound it makes.

Attributes Documentation

says_str = 'A {name} says {sound}'#

Methods Documentation

says(sound=None)[source]#

Prints what the animals name is and what sound it makes.

If the argument sound isn’t passed in, the default animal sound is used.

Parameters:

sound (str, optional) – The sound the animal makes (default is None),

Raises:

NotImplementedError – If no sound is set for the animal or passed in as a parameter.

References