pylint-bot / test

0 stars 0 forks source link

Understand the slice builtin #184

Closed pylint-bot closed 8 years ago

pylint-bot commented 9 years ago

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?)


This can help with this kind of code:

#!python

from astroid.test_utils import extract_node
f = extract_node('''
__([1, 2, 3, 4][slice(2)])
''')
print(f)
i = next(f.infer())
print(i, i.as_string())

pylint-bot commented 9 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?):


Understand the slice builtin. Closes issue #184.