This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ast.Slice 3.9.6 documentation bug
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: c3-timjbaer, docs@python, serhiy.storchaka
Priority: normal Keywords:

Created on 2021-06-29 23:41 by c3-timjbaer, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg396765 - (view) Author: Tim (c3-timjbaer) Date: 2021-06-29 23:41
Based off the ast 3.9.6 documentation  (https://docs.python.org/3/library/ast.html), we would expect `Slice` to inherit from `expr`. However, looking at `ast.Slice.__mro__` produces the following output: `(<class '_ast.Slice'>, <class '_ast.slice'>, <class '_ast.AST'>, <class 'object'>)`.

It appears that instead of inheriting from `expr`, `Slice` inherits from `slice` which appears to be a deprecated type.
msg396769 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-06-30 07:12
What Python version did you tried?
msg396781 - (view) Author: Tim (c3-timjbaer) Date: 2021-06-30 16:09
I was using 3.8. I followed the same steps on 3.9 and confirmed it worked - closing now.
History
Date User Action Args
2022-04-11 14:59:47adminsetgithub: 88704
2021-06-30 16:09:04c3-timjbaersetstatus: open -> closed
resolution: not a bug
messages: + msg396781

stage: resolved
2021-06-30 07:12:02serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg396769
2021-06-29 23:41:33c3-timjbaercreate