[issue40430] ast.Slice is no longer a subclass of ast.slice

2020-10-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Even if make ast.Slice a (virtual) subclass of ast.slice it will not help much, 
because we cannot do it for ast.Index and ast.ExtSlice. ast.ExtSlice is not 
replaced with ast.Tuple, and any node type can now be used instead of 
ast.Index. The code that does isinstance() or issublass() check for ast.slice 
or one of its subcasses is now broken.

--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40430] ast.Slice is no longer a subclass of ast.slice

2020-09-19 Thread Irit Katriel


Irit Katriel  added the comment:

Looks like the answer is: it is a deliberate change, not a bug. Should this 
issue be closed?

--
components: +Library (Lib)
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40430] ast.Slice is no longer a subclass of ast.slice

2020-04-28 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This has been discussee and rejected (for certain reasonsons): 
https://github.com/python/cpython/pull/19056#discussion_r396087689

--
nosy: +BTaskaya, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40430] ast.Slice is no longer a subclass of ast.slice

2020-04-28 Thread Anthony Sottile


New submission from Anthony Sottile :

unclear if this is intentional or not, I noticed this while seeing that 
`ast.Subscript.slice` is no longer `Index` / `Slice` / `ExtSlice`

# python3.8

>>> isinstance(ast.Slice(), ast.slice)
True

# python3.9a6

>>> isinstance(ast.Slice(), ast.slice)
False

--
messages: 367571
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: ast.Slice is no longer a subclass of ast.slice
type: behavior
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com