nntplib and xover
Martin von Loewis
loewis at informatik.hu-berlin.de
Mon Sep 24 06:26:26 EDT 2001
gerhard.nospam at bigfoot.de (Gerhard =?iso-8859-1?Q?H=E4ring?=) writes:
> I haven't thought of that. IMO using fixed-sized tuples as function
> parameters or return values isn't good practise anyway. They aren't
> extensible in a clean way and to know what one index means, you
> always have to read the docs.
> Consider:
> sender = n.xover("16000","16000")[1][0][2]
> vs. (hypothetical)
> sender = n.xover(16000, 16000).results[0].poster
>
> The second one would look much cleaner to me.
Indeed, so a transition to a structure-based API sounds much
better. However, according to the guidelines for language evolution,
it has to be a transition: either an addition of a new function and
deprecating the old one, or a transition by means of enhanced return
values.
Regards,
Martin
More information about the Python-list
mailing list