mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	gh-106602: [Enum] Add __copy__ and __deepcopy__ (GH-106666)
This commit is contained in:
		
							parent
							
								
									e4b88c1e4a
								
							
						
					
					
						commit
						357e9e9da3
					
				
					 3 changed files with 15 additions and 0 deletions
				
			
		|  | @ -1218,6 +1218,12 @@ def __hash__(self): | |||
|     def __reduce_ex__(self, proto): | ||||
|         return self.__class__, (self._value_, ) | ||||
| 
 | ||||
|     def __deepcopy__(self,memo): | ||||
|         return self | ||||
| 
 | ||||
|     def __copy__(self): | ||||
|         return self | ||||
| 
 | ||||
|     # enum.property is used to provide access to the `name` and | ||||
|     # `value` attributes of enum members while keeping some measure of | ||||
|     # protection from modification, while still allowing for an enumeration | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Prince Roshan
						Prince Roshan