no return values for __init__ ??

Helge Hess helge.hess at mdlink.de
Sun Jan 9 16:57:41 EST 2000


Eugene Goodrich wrote:
> I suppose if it bothers you that much, you could just stop using
> __init__. :)

I thought about that and indeed this is some kind of solution. The
problem is that this is very 'unpythonic' therefore making it more
difficult to understand:

  a = MyString().initWithData("skjdflkajdf", encoding='utf8')

works fine but looks obviously less nice in Python syntax than:

  a = MyString(data="sadfjsadf", encoding='utf8')

Note that a major topic in my complaint about '__init__' is that is
different from other methods.

> Seriously, when I was first learning Python, I didn't know about any
> of the "magic" functions, so I lived without __init__.  As far as I
> knew, all functions really were alike.  I side with Aahz on keeping it
> simple enough to sucker, uh, induct, no, uh, attract new users to
> Python.

I don't think it complicates the environment, but this is obviously a
matter of taste.

Greetings
  Helge
-- 
SKYRIX-OS  Web Application Environment - http://www.skyrix.com
SKYRIX-IAS Groupware Application Suite - http://www.skyrix.com



More information about the Python-list mailing list