Thoughts on new vs traditional idioms
Michael Hudson
mwh at python.net
Mon Mar 1 07:19:18 EST 2004
python at rcn.com (Raymond Hettinger) writes:
> Idioms and Obscurity
> --------------------
> Using a=constructor(b) for copying and a.__init__(arg) for updates
> may seem obscure until they become standard idioms. In time, I think
> they seem more general and less cryptic than the older copy and
> replace idioms, a=b[:] and a[:]=b.
Well, I think calling __init__ directly is a horrendous idea. It just
reads badly.
Cheers,
mwh
--
> I'm a little confused.
That's because you're Australian! So all the blood flows to
your head, away from the organ most normal guys think with.
-- Mark Hammond & Tim Peters, comp.lang.python
More information about the Python-list
mailing list