M
Mars
Hi.
I am using Python 2.2.3 and new-style classes. I want to implement a
static factory method to build objects for me. My plan is to have
__init__ check that it has been called from said factory method and
not directly. Is there a elegant way of achieving this ? (and is this
a silly idea in general ?)
Regards,
Martin
I am using Python 2.2.3 and new-style classes. I want to implement a
static factory method to build objects for me. My plan is to have
__init__ check that it has been called from said factory method and
not directly. Is there a elegant way of achieving this ? (and is this
a silly idea in general ?)
Regards,
Martin