I do not want code outside my class to perform tests and decide to create instance or not.<br />Fredrik Lundh's advice to rise exception works perfectly.<br /><br />Thanks to all,<br />Aigars<br /> <br /> <div class="noTransl">Quoting <strong>Mohamed Yousef <<a href="mailto:harrrrpo@gmail.com">harrrrpo@gmail.com</a>></strong>:</div> <blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&#1611;What about no Constructor , and a custom instancing function that can<br /> return either None or the instance wanted<br /> --<br /> http://mail.python.org/mailman/listinfo/python-list<br /> </blockquote>
<!--                                                                                                                                                                                                                                                                                                                      -->