On Tue, 30 Sep 2008 11:50:10 pm Guido van Rossum wrote: > > To avoid silent skipping, is it possible to drop 'unreadable' > > names, issue a warning (instead of exception), and continue to > > completion? "Warning: unreadable filename skipped; see > > PyWiki/UnreadableFilenames" > > That would be annoying as hell in most cases.
Doesn't the warning module default to only displaying the warning once per session? I don't see that it would be annoying as hell to be notified once per session that an error has occurred. What I'd find annoying as hell would be something like this: $ ls . | wc -l 25 $ python ... >>> import os >>> len(os.listdir('.') 24 Give me a nice clear error, or even a warning. Don't let the error pass silently, unless I explicitly silence it. > I consider the dropping of unreadable names similar to the > suppression of "hidden" files by various operating systems. With the exception of '.' and '..', I consider "hidden" files to be a serious design mistake, but at least most operating systems give the user a way to easily see all such hidden files if you ask. (Almost all. Windows has "superhidden" files that remain hidden even when the user asks to see hidden files, all the better to hide malware. But that's a rant for another list.) -- Steven _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com