New submission from Xiang Zhang:

I think filter's doc can be improved[1]:

1. It doesn't mention ``bool``. ``bool`` is treated the same way as ``None``. 
It is not called. But this is not mentioned.
2. 'the identity function is assumed' is confusing, at least for me. It looks 
like when ``None`` is passed, *function* is set to a default func, lambda x: x. 
Then *function* is called and we identify the return value True or False. But 
this is not the truth. There is no default value and no function is applied. I 
think this should be deleted.

[1] https://docs.python.org/3/library/functions.html#filter

----------
assignee: docs@python
components: Documentation
files: filter_doc.patch
keywords: patch
messages: 265325
nosy: docs@python, xiang.zhang
priority: normal
severity: normal
status: open
title: improve document of filter
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42818/filter_doc.patch

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

Reply via email to