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.
Examples
>>> import datetime >>> datetime.datetime(2019, 8, 16, 22, 46, 37, 856437) datetime.datetime(2019, 8, 16, 22, 46, 37, 856437)
References
Attributes Summary
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 isNone
),- Raises:
NotImplementedError – If no sound is set for the animal or passed in as a parameter.
References