mutually exclusive arguments to a constructor

Chris Angelico rosuav at gmail.com
Fri Dec 30 18:36:18 EST 2011


On Sat, Dec 31, 2011 at 10:24 AM, Roy Smith <roy at panix.com> wrote:
> "But!", some C++/Java type bondage addicts might cry, "there's nothing
> to prevent somebody from creating a DirectionIndicatingThingie directly,
> bypassing the factory functions.  There's no way to make the constructor
> private!".  To which the free-willed pythonistas would respond, "If it
> hurts when you do that, don't do that".

You know a Python programmer's been at your C++ code when it opens:
#define class struct

ChrisA



More information about the Python-list mailing list