Advertisement
Fhernd

metaclase-personalizada.py

Feb 7th, 2018
910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. class ControlInstanciacion(type):
  2.     def __call__(self, *args, **kwargs):
  3.         raise TypeError("Clase no instanciable")
  4.        
  5. class Validador(metaclass=ControlInstanciacion):
  6.     def validar_email():
  7.         pass
  8.        
  9.     def validar_telefono():
  10.         pass
  11.        
  12. validador = Validador()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement