2010/10/26 Jose Caballero <[email protected]>:
>
[...]
>>
>> Creo que me iría por el último , el código es muy simple , lástima que
>> no lo recuerdo ... Oldy I am !!!
>>
>> Todo esto se puede combinar con lo de las metaclases , claro ...
>> ;o)
>
> Lo de setuptools suena bien. Voy a investigar esa vía.
>
Era algo realmente simple , al estilo de
{{{
#!python
epdef = 'anything = ' + objpath
ep = EntryPoint(epdef)
obj = ep.do_something()
}}}
... más o menos ...
>
> Respecto a la clase Base, quiero ver si puedo implementar un
>
> raise NotImplementedError
>
> Lo he intentado pero no me ha funcionado. Si llamo a un método no
> implementado en una de las clases heredadas me lanza una excepción
> AttributeError en lugar de NotImplementedError.
>
{{{
#!python
class Base:
def oh_mary_mary(self):
raise NotImplementedError('... you should be out of your mind ...')
class SubClass:
r"""Every little thing she does is magic ..."""
# PUM !!!
SubClass().oh_mary_mary()
}}}
> Gracias por todo.
:o)
--
Regards,
Olemis.
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
Featured article:
_______________________________________________
Python-es mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/