poplib for multihomed machines

Jorgen Grahn jgrahn-nntq at algonet.se
Sat Jul 3 11:59:46 EDT 2004


On 29 Jun 2004 11:05:07 -0700, Elbert Lev <elbertlev at hotmail.com> wrote:
...

> This is a major design error. NO-NO is C++. Constructor is supposed
> only initialise members and take no actions. Unfortunatelly this
> paradigm is violated in many Python classes.

I assume 'NO-NO is C++' means "it is well known that this would be bad
design if written in C++".

Unfortunately, Bjarne Stroustrup doesn't agree. See
http://www.research.att.com/~bs/3rd_safe.pdf section E.3.5
where he spends a few pages arguing against designing classes with init()
functions ("two-stage construct").

If on the other hand it is bad form in Python for some reason, please
enlighten me.  I love both C++ and Python, so I try to Do The Right Thing in
both languages.

/Jorgen

-- 
  // Jorgen Grahn <jgrahn@      ''If All Men Were Brothers,
\X/                algonet.se>    Would You Let One Marry Your Sister?''



More information about the Python-list mailing list