Antoine Pitrou <pit...@free.fr> added the comment:

> The advantage of an obscure one-liner is
> that it is obvious what it does, particularly for someone with a
> C/UNIX background.

Well, I would argue that the C/Unix legacy in terms of dates and times isn't an 
example to follow. Python does not force you to use strcat() to concatenate 
strings, either ;)

But besides, the issue is more how people are supposed to invent that 
one-liner, let alone remember it easily. Perhaps adding it in the documentation 
would be a good middle ground, if you think it shouldn't be added to the stdlib.

> Do you have other examples of this sort?

Well, for example, the datetime module encourages you to use "aware" datetime 
objects (rather than so-called "naive" objects), but there isn't a single 
facility to do so. You must reinvent a whole timezone class from scratch.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue2736>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to