New submission from Борис Верховский <boris.verk(a)gmail.com>:
As far as I can tell, passing `(object,)` and `()` as the `bases` parameter to the 3-argument version of type() produces the same result, because classes inherit from `object` in Python 3:
>>> type('X', (object,), dict(a=1)).__bases__
(<class 'object'>,)
>>> type('X', (), dict(a=1)).__bases__
(<class 'object'>,)
I just want to make sure I'm not missing something and update the documentation of `type()` to reflect that.
----------
assignee: docs@python
components: Documentation
messages: 366613
nosy: boris, docs@python
priority: normal
pull_requests: 18902
severity: normal
status: open
title: Classes created using type() don't need to explicitly inherit from object
type: enhancement
versions: Python 3.9
_______________________________________
Python tracker <report(a)bugs.python.org>
<https://bugs.python.org/issue40304>
_______________________________________
New submission from Andrés Delfino <adelfino(a)gmail.com>:
Documentation on fnmatch.filter says:
Return the subset of the list of names that match pattern. It is the same as [n for n in names if fnmatch(n, pattern)], but implemented more efficiently.
But the function actual accepts any kind of iterable. I think it should be documented.
----------
assignee: docs@python
components: Documentation
messages: 341198
nosy: adelfino, docs@python
priority: normal
severity: normal
status: open
title: doc Document that fnmatch.filter supports any kind of iterable not just lists
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report(a)bugs.python.org>
<https://bugs.python.org/issue36769>
_______________________________________
New submission from swanson:
https://docs.python.org/3/reference/expressions.html
in
6.2.9. Yield expressions
end of 1st paragraph:
"Using a yield expression in a function’s body causes that function to be a generator."
NO!
As the very next sentence explains, a generator is what's returned by such a function, not the function itself.
Basically, it should be sufficient to add the word "function" to the end of that sentence: "... generator function." However, this error does NOT exist in 3.0 to 3.2 - just in 3.3 to 3.6, so I suggest just using the same wording as 3.0 to 3.2:
"Using a yield expression in a function definition is sufficient to cause that definition to create a generator function instead of a normal function."
----------
assignee: docs@python
components: Documentation
messages: 246841
nosy: docs@python, swanson
priority: normal
severity: normal
status: open
title: Error in yield expression documentation
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue24650>
_______________________________________
New submission from Markus Unterwaditzer:
getpass.getpass doesn't enter a newline when the user aborts input with ^C, while input/raw_input does.
This behavior is surprising and can lead to mis-formatting of subsequent output. However, since this behavior exists since 2.7 and applications may have started to rely on it, I'd add a note to the documentation.
----------
assignee: docs@python
components: Documentation
messages: 247302
nosy: docs@python, untitaker
priority: normal
severity: normal
status: open
title: Document getpass.getpass behavior on ^C
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue24711>
_______________________________________
New submission from Aydin <bagiyevaydin(a)gmail.com>:
In the documentation of Python 3.7.0 there is an error in the usage of the world 'for example'.
----------
assignee: docs@python
components: Documentation
files: Functional Programming HOWTO — Python 3.7.0 documentation.png
messages: 326418
nosy: docs@python, rarblack
priority: normal
severity: normal
status: open
title: Repetition of 'for example' in documentation
versions: Python 3.7
Added file: https://bugs.python.org/file47825/Functional Programming HOWTO — Python 3.7.0 documentation.png
_______________________________________
Python tracker <report(a)bugs.python.org>
<https://bugs.python.org/issue34804>
_______________________________________
New submission from Vladimir Ryabtsev <greatvovan(a)gmail.com>:
This is regarding the page https://docs.python.org/3.7/library/sqlite3.html.
I believe this section on the very bottom of the page has been kept here for pretty long time, during that both SQLite and the sqlite3 module evolved and improved. Now the content contradicts to the description of function "connect()" in the part describing "check_same_thread" parameter. The function description says that using connections from multiple threads is allowed with serialization handled by the user (and it is true), while the bottom "Mutithreading" section says sharing connections is not allowed.
I think we can remove "Mutithreading" section entirely unless there is something important to add to what already mentioned.
----------
assignee: docs@python
components: Documentation
messages: 354227
nosy: Vladimir Ryabtsev, docs@python
priority: normal
severity: normal
status: open
title: Remove or change "Multithreading" section
versions: Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report(a)bugs.python.org>
<https://bugs.python.org/issue38413>
_______________________________________
New submission from Jonathan Fine <jfine2358(a)gmail.com>:
Interactive code examples need the prompt to be stripped, before copy-and-paste. This is explained in https://docs.python.org/3/tutorial/introduction.html
But this page does not tell us about the [>>>] prompt-toggle at top of each interactive code example. This caused a user error, reported in https://mail.python.org/pipermail/python-ideas/2018-August/052869.html.
The [>>>] toggle isn't in the Python 2.7 docs, so nothing to fix there!
----------
assignee: docs@python
components: Documentation
messages: 323839
nosy: docs@python, jfine2358
priority: normal
severity: normal
status: open
title: docs: tutorial/introduction doesn't mention toggle of prompts
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report(a)bugs.python.org>
<https://bugs.python.org/issue34451>
_______________________________________
New submission from Steven D'Aprano <steve+python(a)pearwood.info>:
(Apologies if this is the wrong place for reporting website bugs.)
The website is not rendering doctest directives or comments, either that or the comments have been stripped from the examples.
On the doctest page itself, all the comments are missing:
https://docs.python.org/3/library/doctest.html#directives
The first example says:
>>> print(list(range(20)))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
but without the directive, the test would fail. Screen shot attached.
Doctest directives are also missing from here:
https://docs.python.org/3/library/ctypes.html
My browser: Firefox 45.1.1
Also checked with text browser "lynx".
----------
assignee: docs@python
components: Documentation
files: missing_directives.png
messages: 340570
nosy: docs@python, steven.daprano
priority: normal
severity: normal
status: open
title: Doctest directives and comments not visible or missing from code samples
type: behavior
Added file: https://bugs.python.org/file48277/missing_directives.png
_______________________________________
Python tracker <report(a)bugs.python.org>
<https://bugs.python.org/issue36675>
_______________________________________
New submission from Joannah Nanjekye <nanjekyejoannah(a)gmail.com>:
The function is_annotated() in symtable is not documented. Am using this
opportunity to also add docstrings to the methods that didnot have them already.
----------
assignee: docs@python
components: Documentation
messages: 373200
nosy: docs@python, nanjekyejoannah
priority: normal
severity: normal
status: open
title: Document is_annotated() in the symtable module
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <report(a)bugs.python.org>
<https://bugs.python.org/issue41224>
_______________________________________