Rochelle O'Hagan
Aug 9, 2017 · 1 min read

Hi, thanks for the post, this is a really nice way of doing things and is very useful in my code. I’m totally new to decorators in Python (and relatively new to Python too), so this question might be a bit obvious, but can you create new subclasses outside of BaseMessage.py? I tried a similar implementation, but the new subclasses are not registered if I create them in separate files (e.g. EmailMessage.py) as I presume there is nothing to trigger them being initialised.

    Rochelle O'Hagan

    Written by

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade