2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								title: Inheritance
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Inheritance
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-02-22 03:33:16 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Because Python is an opject oriented programing language, classes created in Python are able to inherit attributes and methods from other classes.  For example:
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-02-22 03:33:16 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```python
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								class ParentClass():
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    pass
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								class ChildClass(ParentClass):
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    pass
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								````
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								In the very basic example, the `ChildClass`  class will inherit from `ParentClass`  and use code defined under that class.  
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-02-22 03:33:16 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Python is also able to support multiple inheritance, so child classes can inherit from multiple classes. 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#### More Information:
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								<!--  Please add any articles you think might be helpful to read before writing the article  -->